JDK version error on build after updating to CLI v1.22.0
StefanNedelchev opened this issue · 4 comments
Describe the bug
After updating the CLI to v1.22.0 I went into my project folder, ran bubblewrap update
(which went fine) and hen I ran bubblewrap build
to do a new build. It took a while and by the end this error was thrown in the console:
cli ERROR Command failed: ./gradlew assembleRelease --stacktrace
FAILURE: Build failed with an exception.
* Where:
Build file '/home/....../......-bubblewrap/app/build.gradle' line: 20
* What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
Your current JDK is located in /home/stefan/.bubblewrap/jdk/jdk-11.0.9.1+1
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
This is followed by a whole stack trace (if needed I'll post it too)
To Reproduce
Steps to reproduce the behavior:
- Update Bubblewrap CLI package to the latest version
- Open the terminal inside a bubblewrap project directory
- Run
bubblewrap update
- Run
bubblewrap build
Expected behavior
The app should build successfully
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Linux (Ububtu 24)
- Browser Chrome
> Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
Your current JDK is located in /home/stefan/.bubblewrap/jdk/jdk-11.0.9.1+1
Try deleting home/stefan/.bubblewrap
folder and run bubblewrap init
to download JDK 17.
> Android Gradle plugin requires Java 17 to run. You are currently using Java 11. Your current JDK is located in /home/stefan/.bubblewrap/jdk/jdk-11.0.9.1+1
Try deleting
home/stefan/.bubblewrap
folder and runbubblewrap init
to download JDK 17.
Thank you, this worked for me!
This worked for me as well, however bubblewrap still generates APK's that instantly crash when starting, I would like to know if I am the only one having this issue, but noone replied to my thread.
This worked for me as well, however bubblewrap still generates APK's that instantly crash when starting, I would like to know if I am the only one having this issue, but noone replied to my thread.
I didn't try that yet but thanks for the heads up. I'll definitely not upload anything to Google Play before first testing it locally on the phone.