jangrewe / gitlab-ci-android Goto Github PK
View Code? Open in Web Editor NEWGitLab CI image for building Android apps
License: MIT License
GitLab CI image for building Android apps
License: MIT License
As per https://developer.android.com/studio/command-line/variables it's deprecated.
Sorry if this is trivial. Job output with the .gitlab-ci.yml here and a runner in a docker container, shell executor:
Running with gitlab-ci-multi-runner 9.2.0 (adfc387)
on Shell Runner (c34bfe71)
Using Shell executor...
Running on gitlab-runner-1...
Fetching changes...
HEAD is now at 8007b66 Add .gitlab-ci.yml file
Checking out 8007b663 as TestGitlabCI-jangrewe...
Skipping Git submodules setup
Checking cache for 1...
Successfully extracted cache
$ export GRADLE_USER_HOME=$(pwd)/.gradle
$ chmod +x ./gradlew
$ ./gradlew assembleDebug
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
ERROR: Job failed: exit status 1
Any ideas? Thanks.
Hello, When trying to us the suggested .gitlab-ci.yml with gitlab.com
Getting:
Running with gitlab-runner 13.2.0-rc2 (45f2b4ec)
on docker-auto-scale 72989761
Preparing the "docker+machine" executor
01:22
Using Docker executor with image jangrewe/gitlab-ci-android ...
Pulling docker image jangrewe/gitlab-ci-android ...
Using docker image sha256:eafa7507158d67d3a47b9ef1980cf0b2545e0b08b8808ab7bfa77764211a9543 for jangrewe/gitlab-ci-android ...
Preparing environment
00:05
Running on runner-72989761-project-19457915-concurrent-0 via runner-72989761-srm-1595352474-97379c5e...
Getting source from Git repository
00:07
$ eval "$CI_PRE_CLONE_SCRIPT"
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/test-projects/flutter/.git/
Created fresh repository.
Checking out d47aa9b1 as fastlane...
Skipping Git submodules setup
Restoring cache
00:02
Checking cache for 19457915...
FATAL: file does not exist
Failed to extract cache
Executing "step_script" stage of the job script
00:01
$ export GRADLE_USER_HOME=$(pwd)/.gradle
$ chmod +x ./gradlew
chmod: cannot access './gradlew': No such file or directory
ERROR: Job failed: exit code 1
If you add this to the CI you can see the issue:
$ find / -name "gradlew"
/sdk/extras/google/google_play_services/samples/unified/ActivityDemo/gradlew
$ pwd
/builds/test-projects/flutter
Gitlab failed to compile since some days:
Checking the license for package Android SDK Build-Tools 25.0.3 in /sdk/licenses
Warning: License for package Android SDK Build-Tools 25.0.3 not accepted.
Checking the license for package Android SDK Platform 25 in /sdk/licenses
Warning: License for package Android SDK Platform 25 not accepted.
Any idea ?
thanks
When running apt-get update it gives this error,
`Running with gitlab-runner 10.4.0 (857480b6)
on docker-auto-scale (fa6cab46)
Using Docker executor with image jangrewe/gitlab-ci-android ...
Using docker image sha256:1cde072c1921adcceafd8c55edfb73144cb78841566de60ffcd43317209aa761 for predefined container...
Pulling docker image jangrewe/gitlab-ci-android ...
Using docker image jangrewe/gitlab-ci-android ID=sha256:a61c4b9005d895f4af9bb1291002ce7ac9791e70d83aefa229c897309e9a2b49 for build container...
Running on runner-fa6cab46-project-5119850-concurrent-0 via runner-fa6cab46-srm-1517637890-433e967f...
Cloning repository...
Cloning into '/builds/dinukasal/rn_passenger_app'...
Checking out 8cbb3798 as master...
Skipping Git submodules setup
$ curl -sL https://deb.nodesource.com/setup_8.x | bash
ndk support? If possible can u add ndk support?
It seems that packages installation is not working because sdkmanager is rejecting the argument:
Step 12 : RUN mkdir -p /root/.android && touch /root/.android/repositories.cfg && ${ANDROID_HOME}/tools/bin/sdkmanager --update && (while [ 1 ]; do sleep 5; echo y; done) | ${ANDROID_HOME}/tools/bin/sdkmanager --package_file=/sdk/packages.txt
---> Running in acf3a5e88ad9
done
Warning: Unknown argument --package_file=/sdk/packages.txt
I didn't find any cause/solution to this.
Pull image error
Using Docker executor with image jangrewe/gitlab-ci-android ...
Pulling docker image jangrewe/gitlab-ci-android ...
ERROR: Preparation failed: Error: No such image: jangrewe/gitlab-ci-android
Will be retried in 3s ...
Using Docker executor with image jangrewe/gitlab-ci-android ...
Pulling docker image jangrewe/gitlab-ci-android ...
ERROR: Preparation failed: Error: No such image: jangrewe/gitlab-ci-android
Will be retried in 3s ...
Using Docker executor with image jangrewe/gitlab-ci-android ...
Pulling docker image jangrewe/gitlab-ci-android ...
ERROR: Preparation failed: Error: No such image: jangrewe/gitlab-ci-android
Will be retried in 3s ...
ERROR: Job failed (system failure): Error: No such image: jangrewe/gitlab-ci-android
Could you please add supporting android NDK into the image?
Caused by: org.gradle.api.UncheckedIOException: java.io.IOException: Cannot run program "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java": error=7, Argument list too long
Caused by: java.io.IOException: error=7, Argument list too long
736 ... 104 more
737 * Get more help at https://help.gradle.org
738 Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
739 Use '--warning-mode all' to show the individual deprecation warnings.
740 See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
741 BUILD FAILED in 7m 17s
742 104 actionable tasks: 101 executed, 3 up-to-date
744
Cleaning up file based variables
00:01
746 ERROR: Job failed: exit code 1
I got this error. This can be fixed it latest gradle
I do not have enough knowledge of docker (yet).
But I saw in a other repo that Alpine was used, instead of ubuntu.
min-alpine-android-sdk
This reduces the size of the container.
Is it possible to replace:
FROM ubuntu:17.04
with
FROM frolvlad/alpine-oraclejdk8:full
Thank you!
Looks like google changed or issued new license in last few days. Our android builds are failing today.
Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-25 Android SDK Platform 25
Last week it loaded automatically.
Hello,
i have an Android App that using Firebase Perf 11.0.2, and there's and error when compiling.
11:44:14.769 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve all dependencies for configuration ':editor:_debugPublishCopy'.
11:44:14.769 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not find com.google.firebase:firebase-perf:11.0.2.
11:44:14.769 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Required by:
11:44:14.769 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] project :editor
11:44:14.770 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not find com.google.firebase:firebase-core:11.0.2.
11:44:14.770 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Required by:
11:44:14.770 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] project :editor
Firebase needs the latest m2respository in version 55.
I suspect that it still uses the 54 instead.
How to be sure that it's using the latest version ?
thanks
Is it possible to add a new docker with build-tools v30.0.0, please?
Thanks
NDK support is needed to enable native crash support explained here: https://developer.android.com/studio/build/shrink-code#native-crash-support
If we don't provide ndk.debugSymbolLevel
in build.gradle, it gives warning regarding Android Vitals while uploading app to Google Play console.
Hello,
at some point I'm getting:
transformClassesWithPreJackRuntimeLibrariesForDebug
"ERROR: Build failed (system failure): Get https://ip:port/v1.18/containers/716cd1414d69221bdc8d317351aa113adf30b1bdb14273541f8293534c97c460/json: net/http: TLS handshake timeout"
Any idea of the reason?
There is no gradle and NDK tool in dockfile now.
About NDK some apps may needs.
And for gradle, as i know, even if we don;t install , gradlew would auto install .But it meas every time runs would cause gradle download ,it takes more time to finish 1 build
Please allow override of SDK / Build Tools version.
I tried to override variables with this .gitlab-ci.yml file:
image: jangrewe/gitlab-ci-android
variables:
VERSION_BUILD_TOOLS: "24.0.0"
VERSION_TARGET_SDK: "24"
VERSION_SDK_TOOLS: "25.1.7"
stages:
- build
...
...
...but appareantly it didn't work.
Does sombody have an suggestion how to resolve this?
If the issue can be resolved, some kind of documentation should be there.
Here is for example a travis CI build file (as a reference):
language: android
sudo: false
jdk:
- oraclejdk7
android:
components:
- platform-tools
- tools # see https://github.com/travis-ci/travis-ci/issues/5036
- android-23
- build-tools-23.0.3
- extra-google-m2repository
- extra-android-m2repository
script: ./gradlew build check --stacktrace
Thanks for any suggestion :)
Hello,
I'm a newbie to this kind of build systems, and I'm trying since few days, but none of the example worked,
# from : http://www.greysonparrelli.com/post/setting-up-android-builds-in-gitlab-ci-using-shared-runners/
#before_script:
# - export ANDROID_HOME="/home/demo/project/android/android_sdk"
#
#dev:
# script:
# - ./gradlew assembleDebug
# from : https://mdxdave.de/android/android-gitlab-runner @2016-11-21 01:25
#before_script:
# - chmod +x gradlew
#build:
# script:
# - ./gradlew build
# tags:
# - android
#from: https://github.com/jangrewe/gitlab-ci-android/blob/master/.gitlab-ci.yml
image: registry.magic-technik.de/gitlab-ci/android
stages:
- build
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
build:
stage: build
script:
- ./gradlew assembleDebug
artifacts:
paths:
- app/build/outputs/apk/app-debug.apk
And here is my build.gradle form main module of the project:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '24.0.3'
defaultConfig {
applicationId "com.package.app"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-annotations:24.2.1'
compile 'com.android.support:support-vector-drawable:24.2.1'
compile 'com.android.support:design:24.2.1'
}
Am I missing anything? Or I got the concept in wrong way?
Thanks in advance for the help!!!
Downloading https://services.gradle.org/distributions/gradle-4.1-all.zip
..................................................................................................................................................................
Unzipping /builds/Ham/android_ci_test_2/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew/gradle-4.1-all.zip to /builds/Ham/android_ci_test_2/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew
Set executable permissions for: /builds/Ham/android_ci_test_2/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew/gradle-4.1/bin/gradle
Starting a Gradle Daemon (subsequent builds will be faster)
The message received from the daemon indicates that the daemon has disappeared.
Build request sent: Build{id=4143e059-98fc-47a4-92e5-f4ff25d84dd3.1, currentDir=/builds/Ham/android_ci_test_2}
Attempting to read last messages from the daemon log...
Daemon pid: 34
log file: /builds/Ham/android_ci_test_2/.gradle/daemon/4.1/daemon-34.out.log
----- Last 20 lines from daemon log file - daemon-34.out.log -----
08:42:51.205 [DEBUG] [org.gradle.internal.remote.internal.inet.TcpIncomingConnector] Accepted connection from /127.0.0.1:35556 to /127.0.0.1:33575.
08:42:51.269 [DEBUG] [org.gradle.launcher.daemon.server.Daemon] awaitExpiration() called on daemon
08:42:51.270 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is running. Sleeping until state changes.
08:42:51.630 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 13: received class org.gradle.launcher.daemon.protocol.Build
08:42:51.630 [DEBUG] [org.gradle.launcher.daemon.server.DefaultDaemonConnection] thread 13: Received non-IO message from client: Build{id=4143e059-98fc-47a4-92e5-f4ff25d84dd3.1, currentDir=/builds/Ham/android_ci_test_2}
08:42:51.630 [INFO] [org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler] Received command: Build{id=4143e059-98fc-47a4-92e5-f4ff25d84dd3.1, currentDir=/builds/Ham/android_ci_test_2}.
08:42:51.631 [DEBUG] [org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler] Starting executing command: Build{id=4143e059-98fc-47a4-92e5-f4ff25d84dd3.1, currentDir=/builds/Ham/android_ci_test_2} with connection: socket connection from /127.0.0.1:33575 to /127.0.0.1:35556.
08:42:51.639 [ERROR] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] Command execution: started DaemonCommandExecution[command = Build{id=4143e059-98fc-47a4-92e5-f4ff25d84dd3.1, currentDir=/builds/Ham/android_ci_test_2}, connection = DefaultDaemonConnection: socket connection from /127.0.0.1:33575 to /127.0.0.1:35556] after 0.0 minutes of idle
08:42:51.639 [INFO] [org.gradle.launcher.daemon.server.DaemonRegistryUpdater] Marking the daemon as busy, address: [dffbca5f-cabf-463a-bf5a-20cf325d0499 port:33575, addresses:[/127.0.0.1]]
08:42:51.639 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Marking busy by address: [dffbca5f-cabf-463a-bf5a-20cf325d0499 port:33575, addresses:[/127.0.0.1]]
08:42:51.640 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addresses registry.
08:42:51.652 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
08:42:51.653 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
08:42:51.653 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] resetting idle timer
08:42:51.654 [DEBUG] [org.gradle.launcher.daemon.server.DaemonStateCoordinator] daemon is running. Sleeping until state changes.
08:42:51.654 [INFO] [org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy] Daemon is about to start building Build{id=4143e059-98fc-47a4-92e5-f4ff25d84dd3.1, currentDir=/builds/Ham/android_ci_test_2}. Dispatching build started information...
08:42:51.655 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 15: dispatching class org.gradle.launcher.daemon.protocol.BuildStarted
08:42:51.699 [DEBUG] [org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment] Configuring env variables: {PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sdk/tools, CI_SERVER_REVISION=be80a97, CI_PROJECT_URL=http://192.168.1.109/Ham/android_ci_test_2, CI_COMMIT_REF_SLUG=master, VERSION_SDK_TOOLS=3859397, CI_PROJECT_PATH_SLUG=ham-android-ci-test-2, ANDROID_HOME=/sdk, PWD=/builds/Ham/android_ci_test_2, CI_SERVER=yes, CI_SERVER_NAME=GitLab, CI_PROJECT_VISIBILITY=private, GITLAB_USER_NAME=?????????, CI_BUILD_NAME=build, CI_RUNNER_TAGS=android, CI_PIPELINE_SOURCE=push, CI_RUNNER_ID=18, OLDPWD=/builds/Ham/android_ci_test_2, CI_REGISTRY_USER=gitlab-ci-token, CI_COMMIT_REF_NAME=master, DEBIAN_FRONTEND=noninteractive, GITLAB_CI=true, CI_JOB_ID=86, GITLAB_USER_ID=6, SHLVL=1, CI_BUILD_REF_NAME=master, CI_SERVER_VERSION=10.4.1, GITLAB_USER_EMAIL=[email protected], CI_JOB_STAGE=build, CI_BUILD_REF=5629cf1a846dbe54ac3b1791afa9a0d0d70f302c, CI_PROJECT_ID=9, CI_RUNNER_DESCRIPTION=android app in centos7 docker, CI_REGISTRY_PASSWORD=xxxxxxxxxxxxxxxxxxxx, CI_PROJECT_PATH=Ham/android_ci_test_2, CI_BUILD_STAGE=build, GRADLE_USER_HOME=/builds/Ham/android_ci_test_2/.gradle, CI_PROJECT_NAMESPACE=Ham, CI_PIPELINE_ID=34, CI_DISPOSABLE_ENVIRONMENT=true, CI_BUILD_TOKEN=xxxxxxxxxxxxxxxxxxxx, CI_CONFIG_PATH=.gitlab-ci.yml, CI_BUILD_BEFORE_SHA=ad91479ac98d49c491e4a7c23cce85085259b209, CI_PROJECT_NAME=android_ci_test_2, CI_BUILD_REF_SLUG=master, CI=true, CI_JOB_TOKEN=xxxxxxxxxxxxxxxxxxxx, CI_BUILD_ID=86, HOSTNAME=runner-b7da734c-project-9-concurrent-0, CI_JOB_NAME=build, GITLAB_USER_LOGIN=Ham, CI_PROJECT_DIR=/builds/Ham/android_ci_test_2, CI_REPOSITORY_URL=http://gitlab-ci-token:[email protected]/Ham/android_ci_test_2.git, CI_COMMIT_SHA=5629cf1a846dbe54ac3b1791afa9a0d0d70f302c, HOME=/root}
08:42:51.733 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 13: received class org.gradle.launcher.daemon.protocol.CloseInput
08:42:51.733 [DEBUG] [org.gradle.launcher.daemon.server.DefaultDaemonConnection] thread 13: Received IO message from client: org.gradle.launcher.daemon.protocol.CloseInput@2a55902a
----- End of the daemon log -----
FAILURE: Build failed with an exception.
What went wrong:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
ERROR: Job failed: exit code 1
Hi there!
I got this issue since I switched to Android 3.0, do you have any idea ? Are you also running it using this config ?
Thanks for all !
// project build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
}
}
Running with gitlab-runner 10.1.0 (c1ecf97f)
on docker-auto-scale (e11ae361)
Using Docker executor with image jangrewe/gitlab-ci-android ...
Using docker image sha256:482ad96cc495f9af4755ea7f40e2cdee8d041d63d4d3153fa3faed8e73358371 for predefined container...
Pulling docker image jangrewe/gitlab-ci-android ...
Using docker image jangrewe/gitlab-ci-android ID=sha256:a61c4b9005d895f4af9bb1291002ce7ac9791e70d83aefa229c897309e9a2b49 for build container...
Running on runner-e11ae361-project-3948168-concurrent-0 via runner-e11ae361-srm-1509682867-055f7e67...
Cloning repository...
Cloning into '/builds/my-project'...
Checking out 05186f7c as master...
Skipping Git submodules setup
$ export GRADLE_USER_HOME=$(pwd)/.gradle
$ chmod +x ./gradlew
$ ./gradlew assembleDebug
Downloading https://services.gradle.org/distributions/gradle-4.1-all.zip
Unzipping /builds/my-project/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew/gradle-4.1-all.zip to /builds/gmy-project/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew
Set executable permissions for: /builds/my-project/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew/gradle-4.1/bin/gradle
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'my-project'.
> Could not resolve all files for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:3.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 10s
ERROR: Job failed: exit code 1
Hello,
we are using this image to run tests on our CI, we are using Robolectric 4.4 in our tests. Since we upgraded to Android SDK 29 the following error occurs:
java.lang.UnsupportedOperationException: Failed to create a Robolectric sandbox: Android SDK 29 requires Java 9 (have Java 8)
We noticed in the Dockerfile that openjdk-8-jdk is being used, are we missing something?
Not sure if I'm missing something, but the .apk file isn't getting uploaded to the artifacts folder.
Uploading artifacts...
WARNING: app/build/outputs/apk/app-debug.apk: no matching files
Uploading artifacts to coordinator... ok id=73905331 responseStatus=201 Created token=wZy7NkmU
Job succeeded
How to create emulator?
Create an app for Android
I integrated the Docker Image into my gitlab for building Android apps, which works great. But I'm unable to "teach" the container to look for dependencies in a dedicated Nexus. I already extended the image by adding the settings.xml (ADD ./settings.xml /root/.m2/settings.xml), but during the gradle build the settings.xml is not used.
Even if I pass the settings.xml to the gradlew build (./gradlew -Pmaven.settings.location=/root/.m2/settings.xml assemble), gradle does not use it. I don't want to specified the repos (+ credentials) in my gradle.build files.
Any help is appreciated.
Is it possible to add a new docker with build-tools v29.0.3, please?
Thanks
Im getting the following error:
Successfully extracted cache
$ export GRADLE_USER_HOME=$(pwd)/.gradle
$ chmod +x ./gradlew
chmod: cannot access './gradlew': No such file or directory
ERROR: Build failed: exit code 1
Any idea whats causing this?
Hi @jangrewe ,
When will you release a version that contains SDK 31 so that it is available on docker hub? I see the code changes are already done.
Ubuntu 17.04 is now EOL, so it should be replaced with 17.10.
Thank you.
What if I add firebase library?
There is an error in runner console:
SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file
I tried to download command line tool and set sdk path manually
but it didn't work also
Would you mind adding something like MIT to this repo? I'd like to fork it and make it work with GL container registry (okay, TBH, I already did, but I'd like to open-source it too), but technically, without license, it's protected by copyright.
Hi, I am using your image for the CI of my application and recently, namely after the "Android API 30" commit. my application stopped building because it uses jdk1.8
this is what the compiler told me
e: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getConstructor0(Class.java:3342)
at java.base/java.lang.Class.newInstance(Class.java:556)
at org.jetbrains.kotlin.cli.jvm.plugins.ServiceLoaderLite.loadImplementations(ServiceLoaderLite.kt:51)
at org.jetbrains.kotlin.cli.jvm.plugins.ServiceLoaderLite.loadImplementations(ServiceLoaderLite.kt:44)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension$loadProcessors$efficientProcessorLoader$1.doLoadProcessors(Kapt3Extension.kt:83)
at org.jetbrains.kotlin.kapt3.base.ProcessorLoader.loadProcessors(ProcessorLoader.kt:45)
at org.jetbrains.kotlin.kapt3.base.ProcessorLoader.loadProcessors$default(ProcessorLoader.kt:28)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.loadProcessors(Kapt3Extension.kt:88)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:171)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:98)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:97)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:107)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:82)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:557)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:82)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:107)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:548)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:177)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:165)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:55)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:84)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:42)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:104)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1558)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 43 more
Hi,
Thanks for maintaining this nifty docker image! I am currently trying to build an app that contains a RenderScript. Maybe I am configuring something wrong but I get the following error in my pipeline:
149 > Task :core:compileDebugRenderscript FAILED
[....]
154 FAILURE: Build failed with an exception.
155 * What went wrong:
156 Execution failed for task ':core:compileDebugRenderscript'.
157 > com.android.ide.common.process.ProcessException: Error while executing process /sdk/build-tools/29.0.2/llvm-rs-cc with arguments {-I /sdk/build-tools/29.0.2/renderscript/include/ -I /sdk/build-tools/29.0.2/renderscript/clang-include/ -p **project_dir_removed_because_of_secrecy**/build/generated/renderscript_source_output_dir/debug/out -target-api 28 **project_dir_removed_because_of_secrecy**/src/main/rs/rotate90_270.rs /**project_dir_removed_because_of_secrecy**/src/main/rs/yuv420888.rs -O 3 -o /builds/**project_dir_removed_because_of_secrecy**/build/generated/res/rs/debug/raw}
Do you know how I can resolve this issue?
I always get the error that it is "Using Docker executor with image jangrewe/gitlab-ci-android ...
ERROR: Preparation failed: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"ใ
Gitlab CI Lint tells:
Status: syntax is incorrect
Error: build job: stage parameter should be build
Adding stage: build
fixes this.
...
build:
stage: build
script:
- ./gradlew assembleDebug
...
Thanks for your docker img ๐
Hi @jangrewe ,
I used the docker image for testing the gitlab-ci.
Have you tried functional tests in gitlab-ci for any android project ?
I tried to use android-sdk-linux/tools/emulator -avd test -no-window -no-audio
I ended up with errors of 32 bit.
If you have tried emulator 64 bit emulator64-x86
?
Hi @jangrewe!
Can we use the --package_file
argument (https://developer.android.com/studio/command-line/sdkmanager#install_packages) to point to packages.txt? That'll eliminate manual text processing to install the packages.
Thanks!
Only latest image is available.
I've got build errors because of ubuntu:18.04 upgrade.
I'm using JaCoCo and with the latest update I'm getting:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.RuntimeException: Class java/lang/UnknownError could not be instrumented.
at org.jacoco.agent.rt.internal_c13123e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:140)
at org.jacoco.agent.rt.internal_c13123e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:101)
at org.jacoco.agent.rt.internal_c13123e.PreMain.createRuntime(PreMain.java:55)
at org.jacoco.agent.rt.internal_c13123e.PreMain.premain(PreMain.java:47)
... 6 more
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
at java.base/java.lang.Class.getField(Class.java:1999)
at org.jacoco.agent.rt.internal_c13123e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
... 9 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
Apparently, as expose in this other repo: Jacoco and JDK11 don't play nice
And it seems the solution is:
Specifically upgrading to this version of JDK11:
java version "11-ea" 2018-09-25
Java(TM) SE Runtime Environment 18.9 (build 11-ea+19)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11-ea+19, mixed mode)
When I want to install NDK or other components using the sdkmanager, due to JDK 11 it fails with:
java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.