didomi / react-native

Didomi SDK for React Native
Other
9 stars 2 forks source link

Class *ABC* was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0. #97

Open pradeipp opened 7 months ago

pradeipp commented 7 months ago

Hello,

I have a react native expo app that uses the didomi sdk version 1.18.0. When I try to build the android app, I get the following error:

The class is loaded from C:/Users/MyUser/.gradle/caches/transforms-3/ff7280268308d789ef9a03829f7f6e2c/transformed/jetified-kotlin-stdlib-1.8.20.jar!/kotlin/Unit.class
e: C:\MyApps\app\mobile\node_modules\@didomi\react-native\android\src\main\java\com\reactnativedidomi\DidomiModule.kt: (565, 28): Class 'io.didomi.sdk.exceptions.DidomiNotReadyException' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.

Note: In Expo React Native, I first 'pre-build' the app which is to extract its android code, and then build that code. This issue doesn't occur when building it via the expo build process.

I tried changing the ext.kotlinversion in build.gradle but that didn't work. I also tried to manually change the kotlin version in gradle.properties inside the @didomi package inside my node_modules and that didn't work either.

felipe-saez commented 7 months ago

Hello Pradeep Pandey,

Unfortunately, Didomi does not offer support for the Expo framework at the moment.

That being said, could you please let us know what version of React Native and Expo you are using at the moment?

I would also like to mention that our latest version of the Didomi React Native SDK is 1.23.0.

Regards,

Felipe

nicolas-chaix-didomi commented 6 months ago

Hello @pradeipp,

You may need to update your gradle wrapper and Android Gradle Plugin. You can use the same version as our Sample application (Currently Gradle wrapper 7.5 and AGP 7.4.2)

Regards

pmerlet-at-didomi commented 4 months ago

Hello @pradeipp , did you find a solution to your issue?

We did not test the plugin using expo, but it seems you can modify the Kotlin version in the build properties so it matches the one requested by the compiler, see https://docs.expo.dev/versions/latest/sdk/build-properties/ .