teslamotors / react-native-camera-kit

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

Build fails because of kotlin_version #511

Open raminafandi opened 1 year ago

raminafandi commented 1 year ago

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

FAILURE: Build failed with an exception.

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

dj9aj commented 1 year ago

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

buildscript {
  ext {
        ...
        kotlin_version = '1.5.10'
 }
yousrasd commented 1 year ago

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 commented 1 year ago

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
aemonge commented 2 weeks ago

The issue with the marked, solution is that it wouldn't work for expo. Does any have a solution that would be expo compatible too?