react-native-detector icon indicating copy to clipboard operation
react-native-detector copied to clipboard

Task :react-native-detector:compileDebugKotlin FAILED

Open Marquicas2 opened this issue 3 years ago • 2 comments

When I try to run my android app after installing the react-native-detector, I have this kind of error:

Task :react-native-detector:compileDebugKotlin FAILED

Task :invertase_react-native-apple-authentication:compileDebugKotlin w: /Users/marquicas2/Documents/rodeo/node_modules/@invertase/react-native-apple-authentication/android/src/main/java/com/RNAppleAuthentication/webview/SignInWebViewClient.kt: (15, 21): 'constructor Handler()' is deprecated. Deprecated in Java w: /Users/marquicas2/Documents/rodeo/node_modules/@invertase/react-native-apple-authentication/android/src/main/java/com/RNAppleAuthentication/webview/SignInWebViewDialogFragment.kt: (42, 40): 'getParcelable(String?): T?' is deprecated. Deprecated in Java w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

Any thought? Probably related to the library needs an upgrade of version?

Marquicas2 avatar Oct 26 '22 10:10 Marquicas2

I'm also having this issue. I fixed it temporarily by setting Detector_kotlinVersion in the package's android/gradle.properties to 1.6.10 (my app is running on RN 0.69.7, with both compileSdkVersion and targetSdkVersion set to 31).

Unfortunately, I had to install patch-package to make this work, so an update to this library would greatly help!

brunopuzoni avatar Nov 16 '22 20:11 brunopuzoni

I fixed it that issue. Please follow this step. Go to android/build.gradle and specify kotlinVersion like that.

buildscript { ext { buildToolsVersion = "33.0.0" ... kotlinVersion = "1.5.20" // This is the key. }

zerobug220 avatar Apr 14 '23 16:04 zerobug220