I experience an error while running an intellij pl...
# compose-desktop
s
I experience an error while running an intellij plugin built with compose in Android Studio 4.1.2 🧵
This is the actual error thrown
com.intellij.diagnostic.PluginException: While loading class org.jetbrains.skiko.SkiaLayer: org/jetbrains/skiko/SkiaLayer has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Looking at the build details of Android studio 4.1.2, i notice the runtime version is 
1.8.0_242-release-1644-b3-6915495 x86_64
 . Is it possible to run compose intellij plugins in Android Studio?
j
Class file version 52 is Java 1.8 and class file version 55 is Java 11. So it sounds like you built the plugin for/using Java 11 and the IDE is running Java 1.8. I believe you should be able to set the jvm target by adding this to your gradle files:
Copy code
tasks.withType(KotlinCompile).configureEach {
    kotlinOptions {
        jvmTarget = "1.8"
    }
}
s
yes this is exactly what i have
j
oh, just re-read your error message, looks like it is complaining about
org/jetbrains/skiko/SkiaLayer
- sorry I missed that the first time around.
Sounds like that jvm target flag needs to be added to skiko in order to build skiko binaries that are compatible with older JVMs
Can you please file a bug here: https://github.com/JetBrains/skiko/issues
and include details about what you're trying to do (run the plugin in AndroidStudio)
s
alright! will do! thank you 🙏
linking the issue here for traceability https://github.com/JetBrains/skiko/issues/71