question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatibility with react-native-iap: Kotlin version issue

See original GitHub issue

When having both this package and react-native-iap, we cannot build for android, we get the following error:

Task :react-native-iap:compilePlayDebugKotlin FAILED
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:

=> react-native-pager-view is using kotlin v1.4.0 react-native-iap is using kotlin v1.5.0

I tried changing my android/build.gradle with:

dependencies {
       ...
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0"
    }

But unfortunately the issue remains the same. Anyone managed to fix this? 😕

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

3reactions
witalobeniciocommented, May 26, 2022

Upgrade your kotlin plugin in react-native:

Go to android/build.gradle and change the following line:

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:<latest-version-here>"

2reactions
janrourescommented, Jan 10, 2022

try kotlin 1.5.31

Read more comments on GitHub >

github_iconTop Results From Across the Web

I ran into kotlin version conflict with react native app
Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.
Read more >
react-native-iap - npm
Version 8.0.0 is currently in release candidate. The module is completely rewritten with Kotlin and Swift for maintenenance issue by ...
Read more >
jetified-kotlin-stdlib | The AI Search Engine You Control
"Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16".
Read more >
Android App build error - I have no idea what to do
Note: /tmp/592071-android-254513/node_modules/lottie-react-native/src/android ... Unit' was compiled with an incompatible version of Kotlin.
Read more >
React Native IAP: Getting started
react -native-iap will help you access the In-App purchases capabilities of your device on iOS, and Android (Play Store and Amazon).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found