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.

Android Build Fails: incompatible Kotlin version

See original GitHub issue

Hi there,

I’m getting the following build error on android:

[stderr] e: /home/expo/workingdir/build/node_modules/amazon-ivs-react-native-player/android/src/main/java/com/amazonaws/ivs/reactnative/player/AmazonIvsViewManager.kt: (118, 10): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.

Should I just downgrade my Kotlin version to 1.1.15?

Thanks

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
hirbodcommented, Sep 26, 2022

@vbylen another solution which should work is to add following to your expo plugin section in your config.json/js

{
  "expo": {
    "plugins": [
      [
        "expo-build-properties",
        {
          "android": {
            "kotlinVersion": "1.6.10"
          }
        }
      ]
    ]
  }
}
2reactions
hirbodcommented, Sep 23, 2022

No, I also have a monorepo setup. I had the same problem with my very own library, which is super weird. https://github.com/hirbod/react-native-volume-manager/issues/4

I fixed it for myself like so: https://github.com/hirbod/react-native-volume-manager/commit/06a4a0141d42a1253c5657a2e19e6f231f2b1e3d#diff-197b190e4a3512994d2cebed8aff5479ff88e136b8cc7a4b148ec9c3945bd65aL1

I am wondering why IVS is not failing for me. I have another library, img.ly, which internally also changes the kotlin version, it might be the reason its working for me. You can for now just patch-package that line inside your node_modules until its resolved. RN 0.69+ required kotlin 1.6+

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Module was compiled with an incompatible version of Kotlin ...
From the error statement it seems the module was compiled with an incompatible version of Kotlin. For example you have added some sdk...
Read more >
Module was compiled with an incompatible version of Kotlin ...
[SDK 46-beta6] Android build fails with "incompatible version of kotlin" when react-native-webview is included expo/expo#18346.
Read more >
[Solved] Module was compiled with an ... - Flutter Campus
While running the Flutter Android app, you may encounter a "Module was compiled with an incompatible version of Kotlin" or "Class 'kotlin.
Read more >
incompatible version of kotlin. the binary version of its ...
0. e: C:/Users/mywindowsusername/Documents/GitHub/myprojectname-prod-flutter-app/build/package_info_plus/tmp/kotlin ...
Read more >
iT 邦幫忙::一起幫忙解決難題,拯救 IT 人的一天
[開發筆記] [Android][Update Kotlin Version] [Update SDK Version] 所遇到 Build 的 Error 與 Fix 步驟. rainbowt ( ㄚT ). 2 個月前 ‧ 1388 瀏覽....
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