Giter VIP home page Giter VIP logo

Comments (7)

dreamunlim avatar dreamunlim commented on September 22, 2024 1

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.

ghnp5 avatar ghnp5 commented on September 22, 2024

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.

ghnp5 avatar ghnp5 commented on September 22, 2024

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.

ghnp5 avatar ghnp5 commented on September 22, 2024

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.

hslee2008 avatar hslee2008 commented on September 22, 2024

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.

ghnp5 avatar ghnp5 commented on September 22, 2024

Yeah, I recall getting that one too.

from bubblewrap.

hslee2008 avatar hslee2008 commented on September 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.