react-native-camera-kit
react-native-camera-kit copied to clipboard
react-native 0.64 build error
Issue Description
I upgraded to React-Native 0.64.0 from 0.63.4 and started getting this error on android when I run install debug, it was working before I upgraded.
> Task :react-native-camera-kit:compileDebugKotlin FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
414 actionable tasks: 414 executed
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/aprilmintacpineda/projects/my-app/node_modules/@react-native-async-storage/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
e: /Users/aprilmintacpineda/projects/my-app/node_modules/react-native-camera-kit/android/src/main/java/com/rncamerakit/RNCameraKitModule.kt: (36, 33): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type UIManagerModule?
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-camera-kit:compileDebugKotlin'.
> Compilation error. See log for more details
I was able to build and run successfully on iOS.
Steps to Reproduce / Code Snippets / Screenshots
N/A
Environment
- React Native Navigation version: N/A
- React Native version: N/A
- Platform(s) (iOS, Android, or both?): Android
- Device info (Simulator/Device? OS version? Debug/Release?): Device, Debug and might also be Release
Hey @aprilmintacpineda, do you have Kotlin installed in your Android project? https://github.com/teslamotors/react-native-camera-kit/blob/master/docs/kotlin.md
Hi @aarongrider, yes, I've followed that, it used to work when I was using 0.63.4, I got that error when I upgraded to 0.64.0 following the diffs in the upgrade guide https://react-native-community.github.io/upgrade-helper/?from=0.63.4&to=0.64.0
/node_modules/react-native-camera-kit/android/src/main/java/com/rncamerakit/RNCameraKitModule.kt: (36, 33): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type UIManagerModule?
FAILURE: Build failed with an exception.
That's an extra information to help you with debugging @aarongrider
I'm facing the same issue on [email protected] and [email protected]
https://github.com/teslamotors/react-native-camera-kit/pull/385
@lBroth thanks! Seems not deployed yet though...
As a workaround you can install the package directly from this merge commit (3208896c569b2ab79db1e292129de47de5d2af99) like so in your package.json:
"react-native-camera-kit": "github:teslamotors/react-native-camera-kit#3208896",
I can confirm this works with React Native 0.64 & 0.64.1. Although ideally, we'd see this released as a new version asap.
Just update gradle and JVM version
Refer to this docs: https://github.com/DibyajyotiMishra/react-native-camera-kit/blob/master/docs/kotlin.md
OR
This thread: https://github.com/teslamotors/react-native-camera-kit/issues/434