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

Cant create an android build after adding react-native-camera-kit to existing application

Open AsadJafry opened this issue 2 years ago • 6 comments

Describe the bug Cant create an android build after adding react-native-camera-kit to existing application

To Reproduce Steps to reproduce the behavior: added react-native-camera-kit 13.0.0 to application with react0-native 0.68.1

Expected behavior Tried creating a build on android studio emulator and was expecting a build to be created.

Screenshots 1: Task failed with an exception. Where: Build file 'C:\Users\DELL\Desktop\projj\ceimless-android\node_modules\react-nativine: 2

What went wrong: A problem occurred evaluating project ':react-native-camera-kit'.

Plugin with id 'kotlin-android' not found.

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================

2: Task failed with an exception. What went wrong: A problem occurred configuring project ':react-native-camera-kit'. compileSdkVersion is not specified. Please add it to build.gradle

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================

Get more help at https://help.gradle.org/

Smartphone (please complete the following information):

  • android studio emulator pixel 6
  • android 13

Additional context I cant add react native camera kit to my existing project however on a new project the kotlin-android plugin works as well as the the second issue. I tried changing compile sdk version and target sdk version to 33 but to no success. The react native version I am using is 0.68.1 and the react-native-camera-kit version is 13.0.0

AsadJafry avatar Oct 04 '23 08:10 AsadJafry

same issue, any update?

inas20 avatar Oct 10 '23 13:10 inas20

hi, may be look at that similar https://github.com/teslamotors/react-native-camera-kit/issues/596

Productivix avatar Oct 10 '23 14:10 Productivix

same issue

nys99 avatar Oct 11 '23 21:10 nys99

https://github.com/teslamotors/react-native-camera-kit/blob/master/docs/kotlin.md this link helped me to fix in android/ build.gradle buildscript { ext { ... kotlin_version = '1.7.20' } dependencies { ... classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") }

and in android/app/build.gradle at plugins apply plugin: "kotlin-android"

Rajesh-bex avatar Oct 16 '23 04:10 Rajesh-bex

@AsadJafry, @inas20 @nys99 did any of you fixed your issue?

It doesn't seem to be related to react-native-camera-kit, but to the way we add Kotlin to an existing project

Feel free to share what you missed in the documentation, so we can make it better for others.

DavidBertet avatar Dec 22 '23 06:12 DavidBertet

https://github.com/teslamotors/react-native-camera-kit/blob/master/docs/kotlin.md this link helped me to fix in android/ build.gradle buildscript { ext { ... kotlin_version = '1.7.20' } dependencies { ... classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") }

and in android/app/build.gradle at plugins apply plugin: "kotlin-android"

Thanks man this one working for me, i did increase the minSdk version to 23 as well. Got it from this discussion.

https://github.com/teslamotors/react-native-camera-kit/issues/596#issuecomment-1754504196

NoahSimajji avatar Apr 22 '24 07:04 NoahSimajji