From a5114e408db9ceecf75b8b35d0bdd028cc745945 Mon Sep 17 00:00:00 2001 From: Masahiro Hiramori Date: Mon, 16 Sep 2024 22:08:03 +0900 Subject: [PATCH] fix android sdk installation error --- docker/install/ubuntu_install_androidsdk.sh | 14 +++++++------- docker/install/ubuntu_install_java.sh | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docker/install/ubuntu_install_androidsdk.sh b/docker/install/ubuntu_install_androidsdk.sh index 5e7278c5d631..193a02745f3a 100755 --- a/docker/install/ubuntu_install_androidsdk.sh +++ b/docker/install/ubuntu_install_androidsdk.sh @@ -25,6 +25,8 @@ ANDROID_HOME=/opt/android-sdk-linux ASDKTOOLS_HOME=/opt/android-sdk-tools ASDKTOOLS_VERSION=3859397 ASDKTOOLS_SHA256=444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0 +COMMANDLINETOOLS_VERSION=11076708 +COMMANDLINETOOLS_SHA256=2d2d50857e4eb553af5a6dc3ad507a17adf43d115264b1afc116f95c92e5e258 ANDROID_NDK_VERSION=21.3.6528147 CMAKE_VERSION=3.6.4111459 @@ -52,11 +54,11 @@ echo "Cmake Version: ${CMAKE_VERSION}" echo "Build Tools: ${BUILD_TOOLS_VERSION}" echo "Android Platform: ${ANDROID_PLATFORM}" -wget -q http://dl.google.com/android/repository/sdk-tools-linux-${ASDKTOOLS_VERSION}.zip -O sdk-tools-linux.zip -echo "${ASDKTOOLS_SHA256} *sdk-tools-linux.zip" | sha256sum --check - -unzip sdk-tools-linux.zip -rm sdk-tools-linux.zip -mv tools "${ASDKTOOLS_HOME}/" +wget -q https://dl.google.com/android/repository/commandlinetools-linux-${COMMANDLINETOOLS_VERSION}_latest.zip -O commandlinetools-linux.zip +echo "${COMMANDLINETOOLS_SHA256} commandlinetools-linux.zip" | sha256sum --check - +unzip commandlinetools-linux.zip +rm commandlinetools-linux.zip +mv cmdline-tools/ "${ASDKTOOLS_HOME}/" # The following popular fix makes sdkmanager honour $http_proxy variables mv ${ASDKTOOLS_HOME}/bin/sdkmanager ${ASDKTOOLS_HOME}/bin/sdkmanager-vanilla cat >${ASDKTOOLS_HOME}/bin/sdkmanager <<"EOF" @@ -90,8 +92,6 @@ extras;google;market_apk_expansion extras;google;market_licensing extras;google;simulators extras;google;webdriver -extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2 -extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2 platforms;android-26 platforms;android-${ANDROID_PLATFORM} tools diff --git a/docker/install/ubuntu_install_java.sh b/docker/install/ubuntu_install_java.sh index 5556f0d8fed5..c4a8c5f9acb5 100755 --- a/docker/install/ubuntu_install_java.sh +++ b/docker/install/ubuntu_install_java.sh @@ -20,7 +20,7 @@ set -o errexit -o nounset set -o pipefail apt-get update -apt-install-and-clear -y openjdk-8-jdk maven +apt-install-and-clear -y openjdk-17-jdk maven arch=$(uname -m) jre_arch="unknown" case $arch in @@ -36,8 +36,8 @@ case $arch in ;; esac -if [ ! -d "/usr/lib/jvm/java-8-openjdk-$jre_arch/jre" ]; then +if [ ! -d "/usr/lib/jvm/java-17-openjdk-$jre_arch" ]; then echo "error: missing openjdk for $jre_arch" >&2 exit 1 fi -echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$jre_arch/jre" >> /etc/profile +echo "export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-$jre_arch" >> /etc/profile