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

gradle and java increase RAM with each build #2632

Closed
Neizvestnyj opened this issue Jul 1, 2022 · 4 comments
Closed

gradle and java increase RAM with each build #2632

Neizvestnyj opened this issue Jul 1, 2022 · 4 comments

Comments

@Neizvestnyj
Copy link
Contributor

Neizvestnyj commented Jul 1, 2022

Versions

  • Python: 3.9.7
  • OS: Linux (Debian 13)
  • Buildozer: 1.4.0.dev0
  • Kivy: 2.1.0
  • Cython: 0.29.30
  • OpenJDK: 11.0.15
  • VM RAM: 7Gb

The same is true when using ndk 19c, but less memory is consumed with each build.

buildozer.spec

android.api = 33 # 32
android.ndk = 23b
android.extra_manifest_application_arguments = ./android/extra_manifest_application_arguments.xml
android.gradle_dependencies = <dependencies>
android.enable_androidx = True
android.add_gradle_repositories = "mavenCentral()"
android.archs = arm64-v8a, armeabi-v7a
android.numeric_version = 7115
p4a.branch = develop
p4a.source_dir = ../python-for-android # from develop branch
p4a.bootstrap = sdl2

logs after 5 big app build:

[DEBUG]:        
[DEBUG]:        > Task :packageDebug FAILED
[DEBUG]:        
[DEBUG]:        FAILURE: Build failed with an exception.
[DEBUG]:        
[DEBUG]:        * What went wrong:
[DEBUG]:        Execution failed for task ':packageDebug'.
[DEBUG]:        > A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
[DEBUG]:           > java.lang.OutOfMemoryError (no error message)
[DEBUG]:   
[DEBUG]:        * Try:
[DEBUG]:        > Run with --stacktrace option to get the stack trace.
[DEBUG]:        > Run with --info or --debug option to get more log output.
[DEBUG]:        > Run with --scan to get full insights.
[DEBUG]:   
[DEBUG]:        * Get more help at https://help.gradle.org
[DEBUG]:   
[DEBUG]:        Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

After first main app build

2022-07-02_13-40-09

Each subsequent assembly takes up RAM: + 100Mb in RAM

Build test app + main app

2022-07-02_14-01-17

buildozer android clean and deleting .gradle in home folder - does not help

When I use old p4a version (with ndk 19c) and build app twice.

2022-07-02_13-34-44

pkill -9 -e -f java - solve issue

@Sahil-pixel
Copy link
Contributor

I have same issue

@kuzeyron
Copy link
Contributor

Is this still a problem?

@sivefunc
Copy link

sivefunc commented Feb 4, 2025

I think it's a problem related to Gradle in Linux and not P4A, I'm currently learning Flutter and found the same problem when building to Android in the sense that memory is not freed when building is finished and increases in each build.

Copy link

github-actions bot commented Mar 7, 2025

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have the means to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@github-actions github-actions bot closed this as completed Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants