Comments (16)
As @mj-daft mentioned, the non-ascii GITLAB_USER_NAME may cause this issue.
After add "export GITLAB_USER_NAME=GHOST" in before_script, i workaround this issue
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- export GITLAB_USER_NAME=GHOST
- chmod +x ./gradlew
from gitlab-ci-android.
Following the advice for this post fixed the issue for me: https://stackoverflow.com/a/47027943 Sounds like Gradle needs more memory than Docker is willing to give it.
from gitlab-ci-android.
This thread helped me solve the issue.
Apparently, it's a low-level memory problem - the execution machine isn't able to allocate enough memory for the heap. I've removed the .gradle
directory which freed enough memory for the daemon to be able to work.
You can find the gradle path under Android Studio → Properties → search for "gradle"
from gitlab-ci-android.
Running the gradle commands with --no-daemon solved this issue for me. Example:
./gradlew --no-daemon assembleDemoDebug
from gitlab-ci-android.
I don't see how this could be an issue of the Docker image. Have you inspected the container after it died? Especially the State
section? It should tell you a bit more about what happened.
Example:
$ docker inspect my_container_name
[
{
"State": {
"Status": "created",
"Running": false,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 0,
"ExitCode": 127,
"Error": "OCI runtime create failed: container_linux.go:296: starting container process caused \"exec: \\\"/usr/bin/bash\\\": stat /usr/bin/bash: no such file or directory\": unknown",
"StartedAt": "0001-01-01T00:00:00Z",
"FinishedAt": "0001-01-01T00:00:00Z"
}
[...]
from gitlab-ci-android.
@jangrewe
"State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 1752, "ExitCode": 0, "Error": "", "StartedAt": "2018-02-27T02:36:03.361738116Z", "FinishedAt": "2018-02-26T11:14:43.663727688Z" },
from gitlab-ci-android.
@jangrewe
i copy your gitlab-ci.yml to my project and change args, run in the docker, then occur this error
from gitlab-ci-android.
So that's not the container dying, as it's always still Running
.
Does your Gradle task run fine outside of the container?
from gitlab-ci-android.
Did you try, as instructed by Gradle:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
from gitlab-ci-android.
I see, your GITLAB_USER_NAME=?????????
is not encoded property in environment variables. This may help: gradle/gradle#3117
from gitlab-ci-android.
@oliverspryn how would one increase the allowed memory when I'm using this in gitlab ci? is there any menu options? or any other way?
from gitlab-ci-android.
add unicode support to docker image may fix this issue
from gitlab-ci-android.
I'm facing this issue and none of the above works for me. Anyone that can assist, please?
- Running on GitLab CI
- Used --no-daemon but it still starts
- Changed the name but still fails
Don't know what else to try
* Exception is:
org.gradle.launcher.daemon.client.DaemonDisappearedException: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
at org.gradle.launcher.daemon.client.DaemonClient.handleDaemonDisappearance(DaemonClient.java:242)
at org.gradle.launcher.daemon.client.DaemonClient.monitorBuild(DaemonClient.java:218)
at org.gradle.launcher.daemon.client.DaemonClient.executeBuild(DaemonClient.java:179)
at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:54)
at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:37)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:52)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:207)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:402)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:375)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:37)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:368)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:298)
at org.gradle.launcher.Main.doAction(Main.java:36)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
* Get more help at https://help.gradle.org
ERROR: Job failed: exit code 1
from gitlab-ci-android.
Searched around and it seems like because I use git-cz
which adds emoticons to the commit messages, it bombs out. This issue is apparently fixed in version 5.3 & above of gradle. Can you update the version, please?
from gitlab-ci-android.
Hi,
I'm using gradle wrapper, so I updated to 5.5.1 version in gradle-wrapper.properties. After this I ran ./gradlew --no-daemon <task>
.
I also added org.gradle.daemon=false
to gradle.properties
This solved my issue
from gitlab-ci-android.
Downgrade gradle to version 5.3
./gradlew wrapper --gradle-version=5.3
This fixed the issue for me.
from gitlab-ci-android.
Related Issues (20)
- [Suggestion] Gradle and NDK tool HOT 1
- update build-tools to 29.0.3 HOT 1
- Feature request: NDK support HOT 1
- Update build-tools to 30.0.0 HOT 3
- Replace ANDROID_HOME with ANDROID_SDK_ROOT HOT 1
- chmod: cannot access './gradlew': No such file or directory HOT 1
- Add NDK version HOT 1
- Java version error HOT 3
- OpenJDK11 and JaCoCo HOT 5
- Pass txt file to sdkmanager HOT 2
- Can not build app that uses RenderScript HOT 1
- error=7, Argument list too long
- NoClassDefFoundError HOT 1
- NDK support needed! HOT 1
- Could not find ANDROID_SDK_ROOT HOT 10
- Git HOT 2
- sdkmanager doesn't work due to JDK 11, needs 8
- Add supporting Android NDK HOT 3
- Release SDK 31 HOT 3
- bad interpreter: Permission denied HOT 4
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 gitlab-ci-android.