So this is my first dip into the CI waters and I’ve had a rough time. This is my travis.yml inside my Android application in Android Studio using Kotlin. I’ve tried googling quite a bit but I couldn’t find any useful info on the topic. Doesn’t seem like a common problem, or it’s easily solvable.
language: android
jdk: oraclejdk8
env:
global:
- ANDROID_API_LEVEL=25
- ANDROID_BUILD_TOOLS_VERSION=29.0.2
android:
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
components:
- tools
- platform-tools
# The BuildTools version used by your project
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
# The SDK version used to compile your project
- android-$ANDROID_API_LEVEL
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-$ANDROID_API_LEVEL
#before_script:
# # Prepare pre-accepted licenses to not be promted at installation
# # - mkdir -p "$ANDROID_HOME/licenses"
# #- cp ./google-licenses/* "$ANDROID_HOME/licenses/"
# - yes | ~/Android/Sdk/tools/bin/sdkmanager --licenses
before_install:
- chmod +x gradlew
- chmod +x gradle/wrapper/gradle-wrapper.jar
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
- yes | sdkmanager --update
- yes | sdkmanager --licenses
script:
- ./gradlew build check
- ./gradlew test build
And this is the build log
0.08s
worker_info
Worker information
0.16s0.01s0.00s0.01s
system_info
Build system information
0.02s0.01s0.66s0.57s0.97s0.00s0.04s0.00s0.01s0.01s0.01s0.01s0.01s0.00s0.00s0.03s0.00s0.01s0.31s0.00s0.00s0.00s0.01s0.00s0.06s0.00s0.01s0.00s0.00s6.04s0.00s4.31s0.00s1.20s
docker_mtu
docker stop/waiting
resolvconf
resolvconf stop/waiting
install_jdk
Installing oraclejdk8
0.00s
git.checkout
0.65s$ git clone --depth=50 --branch=master https://github.com/Nikola-Milovic/NSDKelper.git Nikola-Milovic/NSDKelper
0.01s
Setting environment variables from .travis.yml
$ export ANDROID_API_LEVEL=25
$ export ANDROID_BUILD_TOOLS_VERSION=29.0.2
$ export TERM=dumb
android.install
Installing Android dependencies
$ export PATH=/usr/local/android-sdk/tools/bin:$PATH
$ java -Xmx32m -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
$ javac -J-Xmx32m -version
javac 1.8.0_161
before_install.1
0.01s$ chmod +x gradlew
before_install.2
0.01s$ chmod +x gradle/wrapper/gradle-wrapper.jar
before_install.3
0.01s$ mkdir "$ANDROID_HOME/licenses" || true
before_install.4
0.00s$ echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
before_install.5
0.00s$ echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
before_install.6
4.58s$ yes | sdkmanager --update
0.11s$ yes | sdkmanager --licenses
Error: Unknown argument --licenses
Usage:
sdkmanager [--uninstall] [<common args>] \
[--package_file <package-file>] [<packages>...]
sdkmanager --update [<common args>]
sdkmanager --list [<common args>]
In its first form, installs, or uninstalls, or updates packages.
<package> is a sdk-style path (e.g. "build-tools;23.0.0" or
"platforms;android-23").
<package-file> is a text file where each line is a sdk-style path
of a package to install or uninstall.
Multiple --package_file arguments may be specified in combination
with explicit paths.
In its second form (with --update), currently installed packages are
updated to the latest version.
In its third form, all installed and available packages are printed out.
Common Arguments:
--sdk_root=<sdkRootPath>: Use the specified SDK root instead of the SDK containing this tool
--channel=<channelId>: Include packages in channels up to <channelId>.
Common channels are:
0 (Stable), 1 (Beta), 2 (Dev), and 3 (Canary).
--include_obsolete: With --list, show obsolete packages in the
package listing. With --update, update obsolete
packages as well as non-obsolete.
--no_https: Force all connections to use http rather than https.
--proxy=<http | socks>: Connect via a proxy of the given type.
--proxy_host=<IP or DNS address>: IP or DNS address of the proxy to use.
--proxy_port=<port #>: Proxy port to connect to.
* If the env var REPO_OS_OVERRIDE is set to "windows",
"macosx", or "linux", packages will be downloaded for that OS.
The command "yes | sdkmanager --licenses" failed and exited with 1 during .
Your build has been stopped.
(For some reason moderators never accepted my previous post, guess they missed it or something, but it has been 16 days, so I “reposted”)