Build error when running `@bubblewrap/cli build`: ERROR Command failed: ./gradlew assembleRelease --stacktrace
See original GitHub issueDescribe the bug
npx @bubblewrap/cli build
? KeyStore password: ********
? Key password: ********
build Building the Android App...
cli ERROR Command failed: ./gradlew assembleRelease --stacktrace
To Reproduce Steps to reproduce the behavior:
- init bubblewrap project without an existing keystore :
npx @bubblewrap/cli init --manifest https://bm4-pwa.angular-buch.com/manifest.json
init Fetching Manifest: https://bm4-pwa.angular-buch.com/manifest.json
? Domain being opened in the TWA: bm4-pwa.angular-buch.com
? Name of the application: BookMonkey 4 PWA
? Name to be shown on the Android Launcher: BookMonkey
? Color to be used for the status bar: #DB2828
? Color to be used for the splash screen background: #FAFAFA
? Relative path to open the TWA: /
? URL to an image that is at least 512x512px: https://bm4-pwa.angular-buch.com/assets/icons/icon-512x512.png
? URL to an image that is at least 512x512px to be used when generating maskable icons undefined
? Include app shortcuts?
[] Yes
? Android Package Name (or Application ID): com.angular_buch.bm4_pwa.twa
? Location of the Signing Key: ./android.keystore
? Key name: android
Saving Config to: ./twa-manifest.json
twa-generator Generating Android Project files:
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/settings.gradle
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/gradle.properties
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/build.gradle
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/gradlew
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/gradlew.bat
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/gradle/wrapper/gradle-wrapper.jar
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/gradle/wrapper/gradle-wrapper.properties
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/values/styles.xml
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/xml/filepaths.xml
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/xml/shortcuts.xml
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/build.gradle
twa-generator /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/AndroidManifest.xml
twa-generator 72x72 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/mipmap-hdpi/ic_launcher.png
twa-generator 48x48 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/mipmap-mdpi/ic_launcher.png
twa-generator 96x96 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/mipmap-xhdpi/ic_launcher.png
twa-generator 144x144 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
twa-generator 192x192 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
twa-generator 450x450 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/drawable-hdpi/splash.png
twa-generator 300x300 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/drawable-mdpi/splash.png
twa-generator 600x600 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/drawable-xhdpi/splash.png
twa-generator 900x900 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/drawable-xxhdpi/splash.png
twa-generator 1200x1200 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/app/src/main/res/drawable-xxxhdpi/splash.png
twa-generator 512x512 Icon: /Users/my-user/dev/book-monkey4-pwa-twa-wrapper/store_icon.png
? Signing Key could not be found at "./android.keystore". Do you want to create one now? Yes
? First and Last names (eg: John Doe): John Doe
? Organizational Unit (eg: Engineering Dept): Engineering Dept
? Organization (eg: Company Name): My Company
? Country (2 letter code): DE
? Password for the Key Store: [hidden]
? Password for the Key: [hidden]
keytool Signing Key created successfully
init
init Project generated successfully. Build it by running "@bubblewrap/cli build"
- Run the build
npx @bubblewrap/cli build
- the error message appears after entering the korrekt passwords:
cli ERROR Command failed: ./gradlew assembleRelease --stacktrace
Expected behavior
Screenshots
Desktop (please complete the following information):
- OS: macOS Catalina 10.15.5
- NPM: 6.14.5
- Node.js: v13.12.0
- openjdk version “1.8.0_252”
- OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09)
- OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09, mixed mode)
Additional context
When I just proceed running bubblewrap init
with all it’s step and I build the signed APK with Android Studio by setting up a new keystore with a new key, the build process for the signed APK works fine.
Are there any stept to debug the problem and to get some more information about the concrete problem that appeared?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
[Windows] Bubblewrap Build failing at gradlew.bat · Issue #481
Now, at the last build step I am getting the below error: cli ERROR Command failed: gradlew.bat assembleRelease --stacktrace. FAILURE: Build failed with...
Read more >Your Answer - Stack Overflow
gradlew assembleRelease --stacktrace ... bubblewrap build. I'm using codeanywhere to run the test, but I get the following error. Error:.
Read more >Cocos creator Compilation failed - Help/Discuss
FAILURE : Build failed with an exception. What went wrong: Unable to get mutable Windows environment variable map. Try: Run with --stacktrace ......
Read more >Issue in android build generation - OutSystems
[2022-07-19T14:24:41.582Z] [ERROR] [Build] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output....
Read more >Can't build my project to android(Gradle Build Failed)
FAILURE: Build failed with an exception. * Where: ... Run with --stacktrace option to get the stack trace. Run with --info or --debug...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is indeed a different issue. It seems
keytool
is unable to find the Java runtime. Would you mind filing a another issue for this?Awesome, with this change it works. Yes I think the problematic part in the docs is:
This should be changed I think