Skip to content

Instantly share code, notes, and snippets.

@gugadev
Last active November 11, 2025 16:27
Show Gist options
  • Save gugadev/1a4e18b6f2fcd82332e3bac59c10738c to your computer and use it in GitHub Desktop.
Save gugadev/1a4e18b6f2fcd82332e3bac59c10738c to your computer and use it in GitHub Desktop.

Revisions

  1. gugadev revised this gist Jun 5, 2025. No changes.
  2. gugadev revised this gist Jun 5, 2025. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install-android-sdk-windows.md
    Original file line number Diff line number Diff line change
    @@ -105,10 +105,10 @@ sdkmanager --list
    ```

    You'll see some `build-tools` versions. Pick the last stable (not RC). The last
    one currently is the `30.0.3`. So, install it:
    one currently is the `36.0.0`, but I'm gonna install the last version of 35.x (`35.0.1`):

    ```bash
    sdkmanager "build-tools;30.0.3"
    sdkmanager "build-tools;35.0.1"
    ```

    Now we can install the Android APIs we want. So, let's install the **Android 35 API level** (Android 15).
  3. gugadev revised this gist Jun 5, 2025. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install-android-sdk-windows.md
    Original file line number Diff line number Diff line change
    @@ -111,11 +111,11 @@ one currently is the `30.0.3`. So, install it:
    sdkmanager "build-tools;30.0.3"
    ```

    Now we can install the Android APIs we want. So, let's install the **Android 34 API level** (Android 14).
    Now we can install the Android APIs we want. So, let's install the **Android 35 API level** (Android 15).
    We can get the name from the `sdkmanager --list` previously executed.

    ```bash
    sdkmanager "platforms;android-34"
    sdkmanager "platforms;android-35"
    ```

    ## Install Android Images
  4. gugadev revised this gist Jun 5, 2025. 1 changed file with 28 additions and 28 deletions.
    56 changes: 28 additions & 28 deletions install-android-sdk-windows.md
    Original file line number Diff line number Diff line change
    @@ -16,24 +16,24 @@ If you are a React Native, NativeScript, Flutter or Ionic developer maybe you do

    First of all, we need to download the following stuff.

    - Android [command-line tools](https://developer.android.com/studio#downloads)
    - Android [command-line tools (scroll down the bottom of the page)](https://developer.android.com/studio#command-tools)
    - Android [platform tools](https://developer.android.com/studio/releases/platform-tools)

    Once downloaded, extract the compressed.

    ## Install Java SDK

    Download and install JDK 17. You can pick the binary from [AdoptOpenJDK](https://adoptopenjdk.net/) or install it using [chocolatey](https://chocolatey.org).
    Download and install JDK 17. You can pick the binary from [AdoptOpenJDK](https://adoptopenjdk.net/) or install it using Winget, included by default in Windows.

    To install JDK using chocolatey, just write the following in the terminal:
    I'm gonna use Winget,. To install OpenJDK with it just write the following in the terminal:

    ```bash
    choco install microsoft-openjdk17
    winget install Microsoft.OpenJDK.17
    ```

    ## Install Android SDK

    Create a directory under `C:\` named `Development` and another called `android` inside. Place both, `cmdline-tools` and `platform-tools` into `C:\Development\android`.
    Create a directory under `C:\` named `Dev` and another called `android` inside. Place both, `cmdline-tools` and `platform-tools` into `C:\Dev\android`.

    Once folders are copied, enter to `cmdline-tools` and open the `source.properties` file. You will see something like this:

    @@ -43,36 +43,37 @@ Pkg.Path=cmdline-tools;4.0
    Pkg.Desc=Android SDK Command-line Tools
    ```

    Check the version number and create a folder named with it. Once created, copy all the content of the `cmdline-tools` to this new folder.
    At the end, you will have the following folder structure.
    > Note: is important to create a folder with the cmdline-tools, otherwise you'll get an error when the sdkmanager command is used.
    Check the version number and create a folder named with it. Once created, move all the content of the `cmdline-tools` insto this new folder. At the end, you will have the following folder structure:

    ```bash
    C:\Development\android\cmdline-tools\[cmdline-tools version]
    C:\Development\android\platform-tools
    C:\Dev\android\cmdline-tools\[cmdline-tools version]
    C:\Dev\android\platform-tools
    ```

    ## Configure env variables

    Android requires some environment variables in order to find the installation
    directory in internal processes. So, let's create them (I will not cover how to do this).
    directory in internal processes.

    > **Note**: set the environment variables in the **System Variables** section.
    **JAVA_HOME**

    The first environment variable we need to set is JAVA_HOME. Here you need to copy
    the installation directory of JDK. In my case it is:
    the installation directory of JDK. In my case the directory is the one above:

    ```
    C:\Program Files\AdoptOpenJDK\jdk-8.0.292.10-hotspot
    C:\Program Files\Microsoft\jdk-17.0.15.6-hotspot
    ```

    **ANDROID_HOME**

    This must contain the address of the folder containing the `cmdline-tools`. So it must be:

    ```
    C:\Development\android
    C:\Dev\android
    ```

    **ANDROID_SDK_ROOT**
    @@ -87,7 +88,7 @@ Now, edit the `path` variable and add the following values:
    %ANDROID_HOME%\platform-tools
    ```

    Accept changes and restart the OS.
    Save changes.

    ---

    @@ -119,23 +120,21 @@ sdkmanager "platforms;android-34"

    ## Install Android Images

    We have installed Android 34 API, commercially named Android 14. Now we can install
    We have installed Android 35 API, commercially named Android 15. Now we can install
    some Android images. An Android image is just a operating system built
    under an Android API. So, to see what images we have available, execute `sdkmanager --list` again.
    I gonna install `system-images;android-34;google_apis_playstore;x86_64` image:
    I gonna install `system-images;android-35;google_apis_playstore;x86_64` image:

    ```bash
    # if you want android with play store
    sdkmanager "system-images;android-34;google_apis_playstore;x86_64"
    sdkmanager "system-images;android-35;google_apis_playstore;x86_64"
    # otherwise, install the classic one
    sdkmanager "system-images;android-34;google_apis;x86_64"
    sdkmanager "system-images;android-35;google_apis;x86_64"
    ```

    and we're done.

    ## Create emulators with AVD

    We have almost anything to start working: Java, Android SDK, Android APIs and Android images.
    We have almost everything to start working: Java, Android SDK, Android APIs and Android images.
    The final step to complete our environment is create emulators.

    **Install emulator**
    @@ -157,11 +156,12 @@ the following:

    Save changes.

    **Install Hardware Acceleration Execution Manager (opcional)**
    **Install Hardware Acceleration Execution Manager (optional)**

    There is a very important step to do if you have an intel CPU.
    If that's the case, you need to install HAXM (Hardware acceleration for Intel).

    There is a very important step to do if you have an intel processor.
    We need to install HAXM (Hardware acceleration for Intel). So,
    place into the terminal and run this command:
    Place into the terminal and run this command:

    ```bash
    sdkmanager "extras;intel;Hardware_Accelerated_Execution_Manager"
    @@ -194,11 +194,11 @@ id: 2 or "automotive_1024p_landscape"
    ```

    Note that each item has a name. This is useful to tell avdmanager which device you want.
    For example, I want to create an emulator in a Pixel device with google apis and Android 34.
    For example, I want to create an emulator in a Pixel device with google apis and Android 35.
    This is the command that will do it:

    ```bash
    avdmanager create avd --name "Pixel" --device "pixel" --package "system-images;android-34;google_apis;x86_64" --tag "google_apis" --abi "x86_64"
    avdmanager create avd --name "Pixel_Android_15" --device "pixel" --package "system-images;android-35;google_apis;x86_64" --tag "google_apis" --abi "x86_64"
    ```

    Note that `--device` is the name of the device we pick from list. The `--package` argument
    @@ -209,7 +209,7 @@ This process is almost instantly. So, after run the command you will able to run
    you have created:

    ```bash
    emulator -avd "Pixel" # here "Pixel" is the name I set to my emulator
    emulator -avd "Pixel_Android_15" # here "Pixel_Android_15" is the name I set to my emulator
    ```

    Congratulations, you're ready to install your favorite hybrid framework and start making great apps!
  5. gugadev revised this gist Oct 8, 2024. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion install-android-sdk-windows.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,9 @@ If you are a React Native, NativeScript, Flutter or Ionic developer maybe you do

    <br />

    ![](https://cdn.freelogovectors.net/wp-content/uploads/2023/09/androidlogo-2023-freelogovectors.net_.png)
    <p align="center">
    <img src="https://cdn.freelogovectors.net/wp-content/uploads/2023/09/androidlogo-2023-freelogovectors.net_.png" width="480" />
    </p>

    <br />

  6. gugadev renamed this gist Oct 8, 2024. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. gugadev created this gist Oct 8, 2024.
    214 changes: 214 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,214 @@
    # Android SDK setup - Windows guide

    If you are a React Native, NativeScript, Flutter or Ionic developer maybe you don't want to install the entire Android Studio just to have your environment ready. If this is your case, this guide will help you to setup your minimal Android SDK environment in Windows.


    <br />

    ![](https://cdn.freelogovectors.net/wp-content/uploads/2023/09/androidlogo-2023-freelogovectors.net_.png)

    <br />


    ## Downloads

    First of all, we need to download the following stuff.

    - Android [command-line tools](https://developer.android.com/studio#downloads)
    - Android [platform tools](https://developer.android.com/studio/releases/platform-tools)

    Once downloaded, extract the compressed.

    ## Install Java SDK

    Download and install JDK 17. You can pick the binary from [AdoptOpenJDK](https://adoptopenjdk.net/) or install it using [chocolatey](https://chocolatey.org).

    To install JDK using chocolatey, just write the following in the terminal:

    ```bash
    choco install microsoft-openjdk17
    ```

    ## Install Android SDK

    Create a directory under `C:\` named `Development` and another called `android` inside. Place both, `cmdline-tools` and `platform-tools` into `C:\Development\android`.

    Once folders are copied, enter to `cmdline-tools` and open the `source.properties` file. You will see something like this:

    ```
    Pkg.Revision=4.0
    Pkg.Path=cmdline-tools;4.0
    Pkg.Desc=Android SDK Command-line Tools
    ```

    Check the version number and create a folder named with it. Once created, copy all the content of the `cmdline-tools` to this new folder.
    At the end, you will have the following folder structure.

    ```bash
    C:\Development\android\cmdline-tools\[cmdline-tools version]
    C:\Development\android\platform-tools
    ```

    ## Configure env variables

    Android requires some environment variables in order to find the installation
    directory in internal processes. So, let's create them (I will not cover how to do this).

    > **Note**: set the environment variables in the **System Variables** section.

    **JAVA_HOME**

    The first environment variable we need to set is JAVA_HOME. Here you need to copy
    the installation directory of JDK. In my case it is:

    ```
    C:\Program Files\AdoptOpenJDK\jdk-8.0.292.10-hotspot
    ```

    **ANDROID_HOME**

    This must contain the address of the folder containing the `cmdline-tools`. So it must be:

    ```
    C:\Development\android
    ```

    **ANDROID_SDK_ROOT**

    The value for this variable **is the same we used for `ANDROID_HOME`**.

    Now, edit the `path` variable and add the following values:

    ```
    %JAVA_HOME%\bin
    %ANDROID_HOME%\cmdline-tools\4.0\bin
    %ANDROID_HOME%\platform-tools
    ```

    Accept changes and restart the OS.

    ---

    ## Install Android APIs

    We have the tools installed and configured. But this isn't enough because we need
    to install Android APIs (OS versions) and create emulators for our purposes.

    Before install them, we have to install the `build-tools`. So, to know which is
    the last version, run the following command:

    ```bash
    sdkmanager --list
    ```

    You'll see some `build-tools` versions. Pick the last stable (not RC). The last
    one currently is the `30.0.3`. So, install it:

    ```bash
    sdkmanager "build-tools;30.0.3"
    ```

    Now we can install the Android APIs we want. So, let's install the **Android 34 API level** (Android 14).
    We can get the name from the `sdkmanager --list` previously executed.

    ```bash
    sdkmanager "platforms;android-34"
    ```

    ## Install Android Images

    We have installed Android 34 API, commercially named Android 14. Now we can install
    some Android images. An Android image is just a operating system built
    under an Android API. So, to see what images we have available, execute `sdkmanager --list` again.
    I gonna install `system-images;android-34;google_apis_playstore;x86_64` image:

    ```bash
    # if you want android with play store
    sdkmanager "system-images;android-34;google_apis_playstore;x86_64"
    # otherwise, install the classic one
    sdkmanager "system-images;android-34;google_apis;x86_64"
    ```

    and we're done.

    ## Create emulators with AVD

    We have almost anything to start working: Java, Android SDK, Android APIs and Android images.
    The final step to complete our environment is create emulators.

    **Install emulator**

    Before all, we need to install the emulator component through this command:

    ```bash
    sdkmanager --channel=0 emulator
    ```

    > Note: channel 0 means _stable_ release.

    After that, go to environment variables on Windows and add, to the `path` variable
    the following:

    ```
    %ANDROID_HOME%\emulator
    ```

    Save changes.

    **Install Hardware Acceleration Execution Manager (opcional)**

    There is a very important step to do if you have an intel processor.
    We need to install HAXM (Hardware acceleration for Intel). So,
    place into the terminal and run this command:

    ```bash
    sdkmanager "extras;intel;Hardware_Accelerated_Execution_Manager"
    ```

    After installed, go to `C:\Development\android\extra\intel\Hardware Accelerated Execution Manager`
    and execute the installer. Go through the wizard and you are done.

    **Create virtual devices**

    Run `avdmanager list` to get all available system images. You will get a list like this:

    ```
    id: 0 or "tv_1080p"
    Name: Android TV (1080p)
    OEM : Google
    Tag : android-tv
    ---------
    id: 1 or "tv_720p"
    Name: Android TV (720p)
    OEM : Google
    Tag : android-tv
    ---------
    id: 2 or "automotive_1024p_landscape"
    Name: Automotive (1024p landscape)
    OEM : Google
    Tag : android-automotive-playstore
    ---------
    ...more images
    ```

    Note that each item has a name. This is useful to tell avdmanager which device you want.
    For example, I want to create an emulator in a Pixel device with google apis and Android 34.
    This is the command that will do it:

    ```bash
    avdmanager create avd --name "Pixel" --device "pixel" --package "system-images;android-34;google_apis;x86_64" --tag "google_apis" --abi "x86_64"
    ```

    Note that `--device` is the name of the device we pick from list. The `--package` argument
    tells what system image we want to use. The `--tag` argument tells we want to use "google-apis"
    or "generic", and `--abi` is the architecture we want.

    This process is almost instantly. So, after run the command you will able to run the emulator
    you have created:

    ```bash
    emulator -avd "Pixel" # here "Pixel" is the name I set to my emulator
    ```

    Congratulations, you're ready to install your favorite hybrid framework and start making great apps!