there’s a problem while running Android sdkmanager
with Java 11, i don’t want to install JDK 8 or something similar. Is there a way to fix this for Android sdkmanager
with JDK 11?
It’s hard to say without seeing your .travis.yml
, but this one should work with what you’re describing:
os: linux
language: android
jdk: openjdk11
android:
components:
- tools
- platform-tools
- tools
- extra-android-m2repository
env:
global:
- TARGET_VERSION=30
- ANDROID_BUILD_TOOLS_VERSION=30.0.2
- ANDROID_HOME=~/android-sdk
before_install:
- touch $HOME/.android/repositories.cfg
- wget "https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip" -O commandlinetools.zip
- unzip commandlinetools.zip -d $ANDROID_HOME/
- yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager "platforms;android-${TARGET_VERSION}" --sdk_root=$ANDROID_HOME
- yes | $ANDROID_HOME/cmdline-tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" --sdk_root=$ANDROID_HOME
before_script:
- chmod +x gradlew
script:
- ./gradlew your_command_here
Obviously, all bash scripts, need to be added in, and make it suit your build this is merely a foundation .travis.yml
to help you out, let me know if this fails. If it does, I’ll make sure to get this working for you.
Montana Mendy
Travis CI Staff
5 Likes
this worked to perfection @montana! thank you so much
Glad to hear this fixed your problem @SolarUltima, please post back if you need any further help.
Montana Mendy
Travis CI Staff