Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK version error on build after updating to CLI v1.22.0 #873

Open
StefanNedelchev opened this issue Aug 7, 2024 · 4 comments
Open

JDK version error on build after updating to CLI v1.22.0 #873

StefanNedelchev opened this issue Aug 7, 2024 · 4 comments

Comments

@StefanNedelchev
Copy link

StefanNedelchev commented Aug 7, 2024

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:

  1. Update Bubblewrap CLI package to the latest version
  2. Open the terminal inside a bubblewrap project directory
  3. Run bubblewrap update
  4. 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
@StefanNedelchev StefanNedelchev changed the title Java version error on build after updating to CLI v1.22.0 JDK version error on build after updating to CLI v1.22.0 Aug 7, 2024
@ibrahimkarahan
Copy link
Collaborator

   > 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.

@StefanNedelchev
Copy link
Author

   > 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.

Thank you, this worked for me!

@vflam
Copy link

vflam commented Aug 8, 2024

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.

@StefanNedelchev
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants