To set up the Android Native Environment below are the following steps you have to follow:
1. JDK Integration (Install JDK)
JDK Integration (Install JDK)
Since Android apps are written in Java, you will need the java compiler and libraries on your system. These are collectively called the Java Development Kit or “JDK”.
Install JDK18
- Install JDK from the download link, Install the highlighted file:
- JDK file would be installed at this path: C:\Program Files\Java\jdk-18.0.1
- SET JAVA_HOME Environment as a global variable
(A) Go to Settings → System → About → Advanced system settings → environment variables
(B) In the "System variables" frame, click "New..." and Add the variable name as JAVA_HOME then browse through the "Browse Directory..." at the location where your JDK file is installed.
Please refer to the highlighted area from the below screenshot:
- SET JAVA_HOME Environment as a global variable
(C) Select the "Path" variable available under the "System Variables" and add the %JAVA_HOME%\bin after clicking on “New” and click on “Ok”.
The environment variable for JDK access has been set.
Please refer to the highlighted area from the below screenshot:
Install Android SDK
The Android SDK (Software Development Kit) is a set of development tools that are used to develop applications for the Android platform.
Prerequisites
Create a folder with the name Android at C:\Android
Install Command line tools
- Download Command Line tools for windows from the download link:
Download the highlighted zip file shown in the screenshot
2. Extract the zip file created to the location C:\Android
3. Inside cmdline tools folder create a new folder named latest then add all the files present in that cmdline tools to the latest folder.
4. Open the Command prompt and ‘cd’ to path ‘C:\Android\cmdline-tools\latest\bin’.
5. For running the sdkmanager bat file, type command: sdkmanager.bat --list
6. On running the sdkmanager.bat file you will be able to see the various components that are available. We have to install ‘Android SDK platform tools’, ‘Android SDK build tools', and ‘Google USB Driver’.
(A) Install Android SDK Platform-tools
These tools are updated for every new version of the Android Platform to support new features (and sometimes more often to fix or improve the tools), and each update is backward compatible with older platform versions.
To install Android sdk platform tools, type in the below command:
sdkmanager “platform-tools”
(B) Install Android SDK Build tools
This package is required to build Android Apps
To install Android SDK Build tools, type in the below command:
sdkmanager “build-tools;33.0.0”
(C) Install Google USB Driver
A USB driver is a file that allows a hardware device to communicate with the operating system of a computer. It will make it easier for you to transfer files from an Android phone to a computer.
To install the Google USB Driver, type in the below command:
sdkmanager “extras;google;usb_driver”
The ‘Android SDK platform tools’,’ Android SDK build tools’, and ‘Google USB Driver’ has been installed successfully.
Install Android Studio
Android Studio is Android’s official IDE. It is purpose-built for Android to accelerate your development and help you build the highest-quality apps for every Android Device.
Download Android Studio
- Download Android studio from the download link
- Open the above link→ Download Options→ Android Studio Downloads
Please refer to the below screenshot: - Install the Android Studio
(A) Execute the download exe and Click on Next.
(B) Select “Android Studio” and click Next.
(C) Location has been specified. Click Next.
(D) Check ‘’Do not create shortcuts’’. Click on Install.
4. Once the installation is finished, you will see that the folder named “Android” will automatically get created in C:\ Program Files\Android.
5. Copy the three folders named build-tools, cmdline-tools, and platform-tools from the earlier created Android folder in C:\Android and paste it into C:\Program Files\Android\Android Studio.
6. Open Android Studio→build-tools→33.0.0→lib and Copy the JRE file “apksigner” and paste it into Android Studio.
Please refer to the below screenshot to check all the files and folders which need to be available in the Android Studio Folder:
- To provide access to Android studio globally we will be specifying the environment
variable for that purpose.
SET ANDROID_HOME Environment as a global variable
(A) Go to Settings → System → About → Advanced system settings → environment variables
(B) In the "System variables" frame, click "New..." and Add the variable name as ANDROID_HOME then browse through the "Browse Directory..." at the location where your ANDROID STUDIO file is installed i.e. C:\Program Files\Android\Android Studio
Please refer to the highlighted area from the below screenshot:
(C) Select the "Path" variable available under the "System Variables" and add three new values after clicking on “New”:
1. %ANDROID_HOME%\bin
2. %ANDROID_HOME%\tools
3. %ANDROID_HOME%\platform-tools
and click on “OK”.
Hence the environment variable for Android access has been set.
For any clarification, please contact our Priority Support.
Comments
0 comments
Please sign in to leave a comment.