cannot inline bytecode built with JVM target 11
anshulupadhyay03 opened this issue · comments
Hi ,
I am using this library on my Compose ios multiplatform app. Everything works fine on the ios app but when I compile and run Android app it throws this error.
Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option
And the error it throws on this line when I try to make asyncPainterResource:
val painterResource = asyncPainterResource(data = "https://image.tmdb.org/t/p/original${item.imageUrl}")
I have my common build.gradle file here : https://pastebin.com/WcbmF812
version Used : media.kamel:kamel-image:0.5.1
I've done a temporary workaround and put @file:Suppress("INLINE_FROM_HIGHER_PLATFORM")
at the top of the file where it's complaining in.
@jakepurple13 thanks for the workaround.
@contributers : do we have a proper fix for that?
You could just set your project's target to be JVM 11, or do you have a reason to not do that?
@luca992 I created this kmm project through the Android studio and did not set any jvm target manually. should I change that and will it impact anything in my project?
@youranshul android studio uses 11 by default. Try setting target and source compatibility to 11 like in the sample here:
Kamel/kamel-samples/build.gradle.kts
Lines 17 to 32 in e3b58c0
@luca992 I have tried setting it on Android's build.gradle.kts but the issue is the same.
I'm going to close this. If you want make a sample and I'll reopen it and take another look. But here's some relevant info.
@youranshul try 0.7.2-SNAPSHOT
I think it should not have that issue anymore. I'll publish a new version if that works