Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(avd): update avd installation instructions #19

Merged
merged 1 commit into from
Dec 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions install-avd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ installAvd() {
printGap
sudo apt-get install g++

printInfoTitle "Installing the Open JDK 11..."
printInfoTitle "Installing the Open JDK 17..."
printGap
sudo apt-get install default-jdk openjdk-11-jdk
sudo apt-get install default-jdk openjdk-17-jdk

printInfoTitle "Configuring the JDK..."
printGap
Expand Down Expand Up @@ -66,7 +66,7 @@ installAvd() {
fi

local SDK_ZIP_PATH
SDK_ZIP_PATH="${HOME}/Downloads/commandlinetools-linux-9123335_latest.zip"
SDK_ZIP_PATH="${HOME}/Downloads/commandlinetools-linux-10406996_latest.zip"

printInfoTitle "Downloading (if needed), and unpacking the Android SDK Tools..."
printGap
Expand All @@ -75,7 +75,7 @@ installAvd() {
##
# If wget fails find latest here: https://developer.android.com/studio#downloads
##
wget https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip -O "${SDK_ZIP_PATH}"
wget https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip -O "${SDK_ZIP_PATH}"
fi
unzip "${SDK_ZIP_PATH}" -d "${HOME}/Downloads"

Expand Down Expand Up @@ -116,9 +116,9 @@ installAvd() {
printGap
yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses

printInfoTitle "Installing Android SDK Platform 33 or later, Android SDK Build-Tools 33.0.0 or later, Android Support Repository, Google Repository"
printInfoTitle "Installing Android SDK Platform 34 or later, Android SDK Build-Tools 34.0.0 or later, Android Support Repository, Google Repository"
printGap
"$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --install "tools" "platform-tools" "platforms;android-33" "build-tools;33.0.0" "extras;android;m2repository" "extras;google;m2repository"
"$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --install "tools" "platform-tools" "platforms;android-34" "build-tools;34.0.0" "extras;android;m2repository" "extras;google;m2repository"

printInfoTitle "Touching /root/.android/repositories.cfg file to avoid missing file error"
printGap
Expand All @@ -131,15 +131,15 @@ installAvd() {

printInfoTitle "Installing Android images..."
printGap
"$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;google_apis;x86_64"
"$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;google_apis;x86_64"

printInfoTitle "Listing available targets..."
printGap
"$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager" list target

printInfoTitle "Creating an AVD..."
printGap
"$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager" create avd -n api33device -k "system-images;android-33;google_apis;x86_64"
"$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager" create avd -n api34device -k "system-images;android-34;google_apis;x86_64"

printInfoTitle "Listing available AVDs..."
printGap
Expand Down