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

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 this issue Dec 25, 2023 · 3 comments

Comments

@pradeipp
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

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