"Cannot inline bytecode" error in KMP project module #762
tellypresence
started this conversation in
General
Replies: 1 comment
-
I’m hitting the same issue here. I switched to JDK 17 and added jvmToolchain(17) in the KMP module, but the build still fails with the same error. Has anyone managed to resolve this or found an alternative fix? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
(Note: this is not a project bug, just a fix for a nasty error encountered during use that others may run into; leaving breadcrumbs here in case anyone else is looking for answers)
If you are using gitlive firebase in a KMP (Kotlin Multiplatform) project module and your (android) build breaks with error e.g.
the fix consists of 2 things:
jvmToolchain
inkotlin
block ofbuild.gradle.kts
The usual workflow of setting JDK version in android studio "Project Structure" settings isn't supported for KMP modules; for kmp module the solution should be as simple as adding
jvmToolchain()
in kotlin block inbuild.gradle.kts
Also run this command in terminal (Android Studio terminal should work fine)
If JDK 17 not displayed in command output, download from e.g. oracle and install; should be picked up without any further steps required
Beta Was this translation helpful? Give feedback.
All reactions