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.

Unable to run android studio plugins built with jetpack compose

See original GitHub issue

I am working on an Intellij plugin project that targets both Intellij and Android Studio. I have built the UI entirely using compose and have been doing pretty much all my testing exclusively in Intellij. However, when i installed the plugin into Android Studio, it threw an exception when i executed it. The summarised error is:

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

I took a look at the runtime version of Android Studio, it is 1.8.0_242-release-1644-b3-6915495 x86_64. It seems that Skiko should have a jvm target flag to enable compatibility with Java 1.8.

Here is a link to a reproduce the issue. It is a modified version of the sample Jetpack compose plugin here but with changes to match my project settings.

https://gitlab.com/samuelprince411/compose-android-studio-plugin-bug

I used Android Studio 4.1.2 to reproduce this.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
samuelprince77commented, Mar 19, 2021

I was referring to running the plugin, since Android Studio is built using JDK 8, does it mean it is not possible to get compose plugins running there?

0reactions
JatinVashisht1commented, Nov 10, 2021

please help

I found out that it was a silly mistake from my side. All you have to do is when creating a new project select JRE instead of JDK in project configuration

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding Jetpack Compose to your app - Android Developers
If you want to use Jetpack Compose in an existing project, you'll need to configure your project with required settings and dependencies.
Read more >
Getting error when running Jetpack Compose samples
This issue causing due to using of newer version of gradle in the project. You need to use the latest canary version of...
Read more >
Bug (Android Studio): The process cannot access the file ...
This has made programming with Jetpack Compose unbearable. Even an empty project that has no activity can't run one composable preview after another....
Read more >
How to start with Jetpack Compose in an existing App - Medium
At first make sure you are using the Gradle Plugin 7.0.1 or higher. If you use an older version, let Android Studio perform...
Read more >
What's new in Jetpack Compose - Android Developers Blog
Designers create UI components using the Figma plugin, and developers use the Android Studio plugin to automatically use these components in ...
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