Skip to content

Set "Sdkmanager" in path and install "avdmanger", "emulator" for android development in MacOS #76

@AniruddhaGawali

Description

@AniruddhaGawali

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

  1. Setup cmdline-tools
    • export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$PATH
    • add this to .zshrc or .bshrc
    • source .zshrc or source .brhrc
  2. 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
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions