Comments (7)
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.
from bubblewrap.
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.
from bubblewrap.
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".
from bubblewrap.
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)
from bubblewrap.
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
from bubblewrap.
Yeah, I recall getting that one too.
from bubblewrap.
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.
from bubblewrap.
Related Issues (20)
- :)
- Providing "--apkFile" doesn't work
- Add Suffix to User-Agent or Referrer with the version of the TWA HOT 1
- App must target Android 13 (API level 33) or higher HOT 1
- Failed verification assetlinks
- [Help] How to download the build tools only once using docker?
- dont show browser address bar after install HOT 3
- Base Plans are not supported in bubblewrap twa subscriptions
- PWA shortcuts not showing up HOT 1
- Enforce https manifest URL HOT 1
- Issue in bubblewrap build command HOT 3
- DelegationService not starting HOT 3
- Failed to load signer "signer #1" - java.io.IOException: Integrity check failed: java.security.NoSuchAlgorithmException HOT 2
- Should touchscreen user-feature be non-required in manifest
- Disable Screen Rotation HOT 1
- PWA: Call to Javascript "alert()" causes un-dismissible URL bar to appear
- CLI ERROR ON BUILD HOT 2
- Play Store: "This SDK version has been reported as outdated." HOT 3
- cli ERROR unrecognised content at end of stream HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bubblewrap.