-
Notifications
You must be signed in to change notification settings - Fork 542
Description
SDK Manager and other Android command-line tools are required to begin Android development.
In the current dev_setup, only the Android SDK and NDK are installed. However, to actually start development, an emulator must also be configured. If Android Studio is installed, this setup is straightforward. But when using only the Android SDK, we need to manually install the emulator, avdmanager, and system images, as well as configure the paths ourselves. Automating this process within dev_setup would greatly simplify development.
Add command to install avdmanager and emulator
Enhance dev_setup to include installation of avdmanager and the emulator when Android Studio is not present, and ensure that paths for sdkmanager, avdmanager, and the emulator are properly configured.
Config avdmanager, emulator and PATH by own
- Setup cmdline-tools
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$PATH- add this to .zshrc or .bshrc
source .zshrc or source .brhrc
- Install Platform Tools and Emulator
sdkmanager "platform-tools" "emulator"export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/emulator:$PATH- add this to .zshrc or .bshrc
source .zshrc or source .brhrc
- Setup Emulator
sdkmanager --install "system-images;android-36;google_apis;x86_64"avdmanager create avd --name "my_android_emulator" --package "system-images;android-35;google_apis_playstore;x86_64" --device "pixel_8"emulator -avd my_android_emulator- Now run
valdi install android