react-native-camera-kit icon indicating copy to clipboard operation
react-native-camera-kit copied to clipboard

react-native 0.64 build error

Open aprilmintacpineda opened this issue 4 years ago • 8 comments

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

aprilmintacpineda avatar Mar 14 '21 12:03 aprilmintacpineda

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

aarongrider avatar Mar 14 '21 16:03 aarongrider

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

aprilmintacpineda avatar Mar 14 '21 22:03 aprilmintacpineda

/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

peterchibunna avatar Mar 16 '21 15:03 peterchibunna

I'm facing the same issue on [email protected] and [email protected]

renanmav avatar Mar 24 '21 17:03 renanmav

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

lBroth avatar Mar 24 '21 17:03 lBroth

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

aprilmintacpineda avatar Mar 28 '21 06:03 aprilmintacpineda

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.

wouterds avatar May 16 '21 09:05 wouterds

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

DibyajyotiMishra avatar Dec 09 '21 07:12 DibyajyotiMishra