Skip to content

Commit

Permalink
build(avd): update install avd script (#18)
Browse files Browse the repository at this point in the history
- [x] update android sdk tools, build tools, created avd
  • Loading branch information
rfprod authored Mar 10, 2023
1 parent 8ce3d11 commit faed184
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions install-avd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ installAvd() {
printGap
yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses

printInfoTitle "Installing Android SDK Platform 31 or later, Android SDK Build-Tools 31.0.3 or later, Android Support Repository, Google Repository"
printInfoTitle "Installing Android SDK Platform 33 or later, Android SDK Build-Tools 33.0.0 or later, Android Support Repository, Google Repository"
printGap
"$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --install "tools" "platform-tools" "platforms;android-31" "build-tools;31.0.0" "extras;android;m2repository" "extras;google;m2repository"
"$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"

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-31;google_apis;x86_64"
"$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;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 api31device -k "system-images;android-31;google_apis;x86_64"
"$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager" create avd -n api33device -k "system-images;android-33;google_apis;x86_64"

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

0 comments on commit faed184

Please sign in to comment.