android 查找最新版本的sdk-tools-linux-*.zip

g0czyy6m  于 2022-11-03  发布在  Android
关注(0)|答案(2)|浏览(129)

我使用Travis通过模拟器在Android上运行我的JUnit测试。到目前为止运行得非常好。但是,我如何确定sdk-tools-linux-*.zip的最新版本是什么?目前,我使用的是版本4333796。SDK工具版本与Android SDK版本或构建工具版本之间是否存在任何依赖关系?

- name: Tests on Android
  jdk: openjdk8
  env:
    - ANDROID_TOOLS=4333796
    - ANDROID_SDK_VERSION=29
    - ANDROID_BUILD_TOOLS_VERSION=29.0.3
    - ANDROID_HOME=$HOME/android-sdk
    - PATH=${ANDROID_HOME}:${ANDROID_HOME}/emulator:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}
  before_install:
    - sudo apt-get install -y --no-install-recommends bridge-utils libpulse0 libvirt-bin qemu-kvm virtinst ubuntu-vm-builder > /dev/null
    - sudo apt-get install -y libxtst6 libnss3-dev libnspr4 libxss1 libasound2 libatk-bridge2.0-0 libgtk-3-0 libgdk-pixbuf2.0-0 > /dev/null
    - sudo adduser $USER libvirt
    - sudo adduser $USER kvm
    - wget -q "https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_TOOLS}.zip" -O android-sdk-tools.zip
    - unzip -q android-sdk-tools.zip -d ${ANDROID_HOME}
    - rm android-sdk-tools.zip
    - wget -q "https://raw.githubusercontent.com/mmcc007/test_emulators/master/script/android-wait-for-emulator.sh" -O android-wait-for-emulator
    - chmod +x android-wait-for-emulator gradlew
    - touch $HOME/.android/repositories.cfg
    - yes | sdkmanager --licenses > /dev/null
  install:
    - sdkmanager "platform-tools" > /dev/null
    - sdkmanager "tools" > /dev/null
    - sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" > /dev/null
    - sdkmanager "platforms;android-${ANDROID_SDK_VERSION}" > /dev/null
    - sdkmanager "extras;android;m2repository" > /dev/null
    - sdkmanager "system-images;android-${ANDROID_SDK_VERSION};default;x86" > /dev/null
    - sdkmanager "emulator" > /dev/null
    - echo no | avdmanager create avd --force -n test -k "system-images;android-${ANDROID_SDK_VERSION};default;x86"
  before_script:
    - sudo -E sudo -u $USER -E bash -c "${ANDROID_HOME}/emulator/emulator -avd test -no-window -no-audio &"
    - ./android-wait-for-emulator
  script:
    - TERM=dumb ./gradlew createDebugCoverageReport -Dorg.gradle.daemon=false
gt0wga4j

gt0wga4j1#

别紧张!
最新版本将始终为4333796,因为sdk-tools已被弃用。如果您希望使用新方法,请改用commandlinetools-linux:)

cgvd09ve

cgvd09ve2#

要查找新版本(现在是commandlinetools-linux而不是sdk-tools),请访问此处:
https://developer.android.com/studio
最后看一下Command line tools only

相关问题