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

Build fails because of kotlin_version #511

Open
raminafandi opened this issue Dec 22, 2022 · 3 comments
Open

Build fails because of kotlin_version #511

raminafandi opened this issue Dec 22, 2022 · 3 comments

Comments

@raminafandi
Copy link

raminafandi commented Dec 22, 2022

When I am building an android apk, build fails with this exception:

FAILURE: Build failed with an exception.

  • Where:
    Build file '/opt/atlassian/pipelines/agent/build/node_modules/react-native-camera-kit/android/build.gradle' line: 23
  • What went wrong:
    A problem occurred evaluating project ':react-native-camera-kit'.

Could not get unknown property 'kotlin_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Version:
"react-native": "0.70.6",

@dj9aj
Copy link

dj9aj commented Dec 29, 2022

I believe you need to define kotlin_version within your android/build.gradle. For example -

buildscript {
  ext {
        ...
        kotlin_version = '1.5.10'
 }

@yousrasd
Copy link
Contributor

You need to follow this to complete the setup for Android: https://github.com/teslamotors/react-native-camera-kit/blob/master/docs/kotlin.md.

@nzcodarnoc
Copy link

nzcodarnoc commented Mar 20, 2023

My setup is using React Native 0.71 which comes with Kotlin enabled.

To resolve the error message reported, I added the following in android/build.gradle

kotlinVersion = '1.7.10' // camelCase, this is the existing variable name
kotlin_version = '1.7.10' // react-native-camera-kit looks for this snake_case variable name

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

4 participants