Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AsadJafry opened this issue Oct 4, 2023 · 6 comments

Comments

@AsadJafry
Copy link

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

@inas20
Copy link

inas20 commented Oct 10, 2023

same issue, any update?

@Productivix
Copy link

hi,
may be look at that similar #596

@nys99
Copy link

nys99 commented Oct 11, 2023

same issue

@Rajesh-bex
Copy link

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"

@DavidBertet
Copy link
Contributor

@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.

@NoahSimajji
Copy link

NoahSimajji commented Apr 22, 2024

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.

#596 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants