Skip to content

Commit

Permalink
install NDK package together with target image
Browse files Browse the repository at this point in the history
  • Loading branch information
supervacuus authored Nov 5, 2024
1 parent 7249358 commit cf38bfa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/start-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ echo "PATH: $PATH"

ARCH=${ANDROID_ARCH:-"x86"}
API_LEVEL=${ANDROID_API:-"29"}
NDK_VERSION=${ANDROID_NDK:-"27.2.12479018"}
AVD_EMULATOR_NAME="sentry_android_${ARCH}"
IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"}
NDK_PACKAGE=${NDK_IMAGE:-"ndk;${NDK_VERSION}"}

echo "List installed images..."
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list
Expand All @@ -24,9 +26,10 @@ echo "API_LEVEL = $API_LEVEL"
echo "AVD_EMULATOR_NAME = $AVD_EMULATOR_NAME"
echo "IMAGE = $IMAGE"

echo "Install image..."
echo "Install image and NDK..."
yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install "$IMAGE"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install "$NDK_PACKAGE"

echo "Create AVD..."
echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_EMULATOR_NAME -k "$IMAGE" --force
Expand Down

0 comments on commit cf38bfa

Please sign in to comment.