0

I'm trying to build an apk using a docker contained android sdk

https://github.com/mingchen/docker-android-build-box

and when I run the interactive shell using

docker run -v `pwd`:/project -it mingc/android-build-box bash

and then run

./gradlew build it compiles the code and gives me an apk which good, but when I try to do this

docker run --rm -v `pwd`:/project mingc/android-build-box bash -c 'cd /project; ./gradlew build'

or

docker run --rm -v `pwd`:/project  -v "$HOME/.dockercache/gradle":"/root/.gradle"   mingc/android-build-box bash -c 'cd /project; ./gradlew build'

It fails, here is the console output

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '11.0.13'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

doing --debug

10:40:41.820 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized native services in: /root/.gradle/native
10:40:41.845 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
10:40:41.849 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
10:40:41.855 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
10:40:41.859 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
10:40:41.862 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Could not determine java version from '11.0.13'.
10:40:41.865 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
10:40:41.868 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
10:40:41.870 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 
10:40:41.873 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
10:40:41.875 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org

what is happening here? I'm a complete newbie in docker so I'm not sure what's wrong here :/

0 Answers0