Skip to main content

Configuration and System Requirements

By following these steps, you should have a consistent and well-configured development environment for your
Android application on Windows 10. Remember to restart your system after making changes related to CMake
in Android Studio and after updating Environment Variables.

Operating System

Ensure that your development machine is running Windows 10. This guide has been refined to work on Windows 10. Other Operating Systems might work, but are not supported.

Android Studio

For this guide, Android Studio Hedgehog | 2023.1.1 has been used. The exact Android Studio can be downloaded from the official Android Studio website: https://developer.android.com/studio/archive.

Android Software Development Kit (SDK)

After installing and setting up Android Studio, the SDK path has to be added to the System Environment Variables under the User Variables. After saving make sure to restart the system to apply the changes correctly.

  • Variable Name: ANDROID_HOME
  • Variable Value: %LOCALAPPDATA%\Android\Sdk

Android Native Development Kit (NDK)

To make use of NDK 26, we need to manually install this. We would also require some files from the NDK 17 release for the build in this release. Download both NDK 26 https://dl.google.com/android/repository/android-ndk-r26b-windows.zip and NDK 17 https://dl.google.com/android/repository/android-ndk-r17c-windows-x86_64.zip from the official download pages.

  1. Navigate to %LOCALAPPDATA%\Android\Sdk in Windows File Explorer.
  2. Create a new directory named ndk-26.
  3. Unzip the contents of android-ndk-r26b-windows.zip into the newly created %LOCALAPPDATA%\Android\Sdk\ndk-26 directory.
  4. Unzip the contents (except llvm) from android-ndk-r17c-windows-x86_64.zip\android-ndk-r17c\toolchains\ to %LOCALAPPDATA%\Android\Sdk\ndk-26\toolchains.
  5. After installing and setting up the NDK, the NDK path has to be added to the System Environment Variables under the User Variables. After saving make sure to restart the system to apply the changes correctly.
  • Variable Name: ANDROID_NDK
  • Variable Value: %LOCALAPPDATA%\Android\Sdk\ndk-26

Java Development Kit (JDK)

The JDK can be downloaded and used within Android Studio directly. For the current Android Demo Application we make use of the Eclipse Temurin JDK 1.8. When the Android Demo Application has been opened with Android Studio, the Android JDK can also be set.

  1. In Android Studio, open [File | Settings | Build, Execution, Deployment | Build Tools | Gradle].
  2. Choose Gradle JDK: 1.8. If this version is not available in the dropdown, download it by clicking on
    “Download JDK…” in the dropdown of Gradle JDK. (For example, Eclipse Temurin 1.8).

CMake

For the current Android Demo Application we make use of CMake 3.10.2 that can be installed directly in Android Studio. This can be done by using the Android Studio SDK Manager.

  1. In Android Studio, open [File | Settings | Languages & Frameworks | Android SDK] and navigate to the SDK Tools tab.
  2. Click on Show Package Details on the bottom right of the page.
  3. In the list, make sure only CMake 3.10.2.* is selected and installed.
  4. After installing and closing the settings page, make sure to restart the system to apply the changes correctly.

Other Dependencies

Depending on your project, additional dependencies might be required (e.g., specific libraries, tools).
Document and install these as needed.

Troubleshooting

  • If encountering any issues during the setup, refer to the official documentation for Android Studio,
    CMake, and NDK for troubleshooting steps.
  • If you encounter any issues linked to outdated source code, reach out to the Android developers for
    assistance in implementing a resolution.
  • Check for updates regularly and keep your development environment components up to date.

Environment tested with Android Applications

  • NativeViewLibrary