teslamotors / react-native-camera-kit

A high performance, easy to use, rock solid camera library for React Native apps.
MIT License
2.47k stars 587 forks source link

react-native 0.64 build error #384

Open aprilmintacpineda opened 3 years ago

aprilmintacpineda commented 3 years ago

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

aarongrider commented 3 years ago

Hey @aprilmintacpineda, do you have Kotlin installed in your Android project? https://github.com/teslamotors/react-native-camera-kit/blob/master/docs/kotlin.md

aprilmintacpineda commented 3 years ago

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

peterchibunna commented 3 years ago
/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

renanmav commented 3 years ago

I'm facing the same issue on react-native@0.64.0 and react-native-camera-kit@11.1.0

lBroth commented 3 years ago

https://github.com/teslamotors/react-native-camera-kit/pull/385

aprilmintacpineda commented 3 years ago

@lBroth thanks! Seems not deployed yet though...

wouterds commented 3 years ago

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.

DibyajyotiMishra commented 2 years ago

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