Let’s Understand the Android Environment
When I started as an app developer I faced hell lot of issues in setting up the android environment so finally, I thought of jotting down all the steps in form of a blog and hence to make your life easier.
This blog will help you in setting up your android environment but for that, we need to set up the java environment first.🤓

Step 1: Install Java Development Kit(JDK)
Please open the given link :
https://www.oracle.com/java/technologies/javase-downloads.html and you will see Java SE Downloads website in your browser where you can see the latest release for Java SE Platform.
Feel free to click on JDK Download as shown in the screenshot and select the version which is compatible with your OS(it can be 32 bits or 64 bits).

Note: Please keep a note of the location where you installed the JDK.
Step 2: Setting Java Environment Path
WINDOWS
First, let’s go to the control panel and go ahead into on System and Security and then on Advanced System Settings.
Now you will be able to see Environment variable kindly click on that.
And then you will be able to see a popup that will be containing a list of environment variables. All you have to do is to go with the NEW button to do set the environment path for java.
And then a window will appear which will contain two things:
- Variable name
- Variable value
So in the variable name, you can give name as JAVA_HOME and in variable value you will have to give a path which you noted down in above step.
It will look something like:
- Variable name = JAVA_HOME
- Variable value =C:\Program Files\Java\jdk1.8.0_152\bin
In the popup, there will two options either to go with OK or Cancel.
Kindly click on OK.

Now select the variable named Path and go ahead with edit button.
And a popup will come on your screen containing two things:
- Variable name = Path
- Variable value = In this go to the end of that string and add “;%JAVA_HOME%\bin“
Note :Do not forget the “;”
And as you already know we have to go with OK button 🙂

OSX
Use a text editor to create or modify the ~/.bash_profile
file. To set an environment variable, add a line that uses export
as shown in the below line.
export JAVA_HOME=`/usr/libexec/java_home -v <version>`
To open ‘.bash_profile’ type the following in terminal :
nano ~/.bash_profile
And after opening the file add the export command.
export JAVA_HOME=`/usr/libexec/java_home -v <version>`
Reload your terminal to see the changes made by you or run the following command:
$ source ~/.bash_profile
Type – echo $JAVA_HOME to check if the home is set.
echo $JAVA_HOME
Step 3: Install Android SDK
For installing Android SDK we need to click on the link given below:
https://developer.android.com/studio#Other and you will get redirected to the android developer website and you can download android studio from the website.

Note: Please keep a note of the location where you installed the Android SDK.
Step 4: Setting the Android Home
WINDOWS
And I know you are a pro now 😎 so let’s jump into the control panel and yes go to System and Security and finally on Advanced System Settings.
Now you will be able to see Environment variable kindly go with that and also click on NEW ( as we did in step 2 )
And then again a window will appear which will contain two things:
- Variable name
- Variable value
So in the variable name, you can give name as ANDROID_HOME and in the variable value put the path to the android-SDK folder you installed in the previous step.
It will look like :
- Variable name = JAVA_HOME
- Variable value =C:\Android\android-sdk.
And yes OK is your button to go with 😛

Go back to environment variables and select the variable named Path and click on the edit button.
And a popup will come on your screen containing two things (like we saw in above step):
- Variable name = Path
- Variable value = In this go to the end of that string and add “;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools“
Note :Do not forget the “;”
OS X and Linux
Use a text editor to create or modify the ~/.bash_profile
file. To set an environment variable, add a line that uses export
(replace the path with your local installed path):for example:
export ANDROID_HOME=/Development/android-sdk/
You can update your PATH
, add a line like the following (replace the path with your local Android SDK installation’s location):
export PATH=${PATH}:/Development/android-sdk/platform-tools:/Development/android-sdk/tools
You can open ‘.bash_profile’ type the following in the terminal :
nano ~/.bash_profile
And after opening the file add the exports command.
Reload your terminal to see the changes made by you or run the following command:
$ source ~/.bash_profile
Type – echo $ANDROID_HOME to check if the home is set.
echo $ANDROID_HOME
Step 5: Installing Android Packages
Open SDK Manager.exe file which you can find inside the android-sdk folder.
By default, the Tools/Android SDK Tools is already installed. But if it is not installed please install it.
Also, select Tools/Android SDK Platform-tool, Tools/SDK build-tools (a version above 22), and select the same API version that you selected in the Build Tools.
Conclusion
And here we have completed the environment path variables setup. YAYYY!!!

In case you are also interested in learning ionic app development from scratch feel free to go and read my blog.