android emulator

2021/12/15 macosandroidemulator

download Command line tools (opens new window)

mkdir android-sdk
mkdir android-sdk/cmdline-tools
mkdir android-sdk/cmdline-tools/latest
cd android-sdk/cmdline-tools/latest
unzip commandlinetools-xxx-xxx_latest.zip

# download sdk
export ANDROID_SDK_ROOT=<path>/android-sdk
./bin/sdkmanager "system-images;android-31;google_apis;x86_64"
./bin/sdkmanager "platform-tools"

# create avd
./bin/avdmanager create avd --name "android-12" -k "system-images;android-31;google_apis;x86_64"  -p <path>/avd-12

# run
./emulator/emulator -avd android-12
上次更新: 6/6/2022, 3:18:29 PM