Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio and JDK17

I've been trying to use this API in Android Studio via Gradle, but when I build my project it throws Unsupported class file major version 61.

From what I've researched it's because I use JDK version 17 and Gradle does not yet support it, but in the API it's stated that it requires Java 17. Is there any way I could still use this API in Android Studio?

Sorry if this is a newbie question but I'm fairly new to Android.

like image 379
DiZZie Avatar asked Jan 28 '26 21:01

DiZZie


1 Answers

Perhaps you can try Android Studio Flamingo | 2022.2.1. It's still in Beta at the time of writing but JDK 17 is bundled into it as the default according to the release notes.

Starting from Android Studio Flamingo Canary 3, the Studio IDE is bundled with JDK 17. If Android Studio is configured to use the embedded JDK, new projects will use the latest stable version of the Android Gradle plugin and JDK 17. However, existing projects might break, and you might have to manually set the JDK to a compatible version.

like image 198
Just The Highlights Avatar answered Jan 30 '26 09:01

Just The Highlights



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!