Open ghnp5 opened 11 months ago
If I increase the RAM allowed even more, then I simply get these minimal logs, not really saying what the problem is:
Building the Android App...
cli ERROR Command failed: gradlew.bat assembleRelease --stacktrace
Passing --info
or --debug
to the Bubblewrap's build command doesn't really do anything either.
Even changing GradleWrapper.js
doesn't help either:
async assembleRelease() {
await this.executeGradleCommand(['assembleRelease', '--stacktrace', '--info', '--debug']);
}
cli ERROR Command failed: gradlew.bat assembleRelease --stacktrace --info --debug
All logs suppressed.
--
Only when I call directly:
gradlew.bat assembleRelease --stacktrace --info --debug
That's when I get proper useful logs:
- What went wrong: Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'. SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable
--
The location in ~\.bubblewrap\config.json
is correct, so I'm not sure why the environment variable isn't being set.
I manually set the environment variable.
I get the OutOfMemory error again, if I keep it at 1536m.
If I increase to 2048, I get this...
> ./gradlew.bat assembleRelease --stacktrace Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap
--
I'm reading that I can only allocate 1.6GB if I'm using 32bit version of JVM or so. Is it what Bubblewrap downloads?
Anyway - I assume we're not supposed to have to allocate so much memory, so this "OutOfMemory" must be a consequence of something else, but I haven't figured out what...
--
EDIT - I've just created a new project... no changes at all... and still get "OutOfMemory".
Alright... looks like it works with Docker (I used your Dockerfile)
So I'll just keep building that way!! :)
Thank you!
(keeping this issue open anyway, in case there's some fix needed for Windows)
It went a bit different for me.
cli ERROR Command failed: gradlew.bat assembleRelease --stacktrace
FAILURE: Build failed with an exception.
* What went wrong:
Metaspace
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
java.lang.OutOfMemoryError: Metaspace
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
Yeah, I recall getting that one too.
I would like to add that in my case both the "OutOfMemory" and "Metaspace" errors vanished on PC restart after the fresh install of v1.21.0.
Instead, the Bubblewrap started failing to generate an .aab bundle, though .apk gets generated successfully.
The error given:
Building the Android App...
- Generated Android APK at ./app-release-signed.apk
cli ERROR spawn jarsigner ENOENT
If it helps: Windows 10 64bit, 3.8GB usable RAM, jdk-11.0.20+8 32bit.
I am pretty sure this might be only related to Windows. With the exact setup and versions, I was able to succeed in Linux. Not sure about Mac.
Running a debian Linux machine, getting the same error for jarsigner ENOENT
.
Describe the bug
Hi.
I'm looking to rebuild the TWA app I have, but I'm getting this every time:
I updated Bubblewrap to the latest version, removed the existing JDK and SDK and let Bubblewrap re-install the latest, and also deleted my app files (except the keystore), to let Bubblewrap rebuild everything from scratch.
So, it should be pretty clean!
I've also updated
gradlew.bat
:And this is what I have in
gradle.properties
:To Reproduce
..\node_modules\.bin\bubblewrap build
Expected behavior Successful build.
Desktop: Windows 11 Running on Visual Studio Code.