Environment Setup for Android Client
Android is the operating system owned and controlled by Google LLC. To develop applications for the Android OS, Google LLC has its own IDE, which is Android Studio. Android Studio is powered by the IntelliJ platform from Jetbrains.
Now we’ll learn how to set up the environment for developing Android applications.
Step 1:
Go to https://developer.android.com/studio to download Android Studio.
Step 2:
If you're running Windows 64-bit, simply click the download button.
You can find other download options if you scroll down.
Step 3:
After downloading, open the executable file and then click on the “I have read and agree with the above terms and conditions” checkbox. Then click on “DOWNLOAD ANDROID STUDIO FOR WINDOWS” to start the download.
Step 4:
After the download has finished, we’ll see a dialogue box like the one shown below.
Click on "next" in every box. In the box of installation, paths, choose a location where there is enough space.
Step 5:
After Step 4 is completed, the installation will start, and once it is completed, it will be like the image shown below.
You need to click on next. Then you’ll see a box like this. If you click on the "Finish" with a check, then Android Studio will start.
Step 6:
Clicking on ‘Finish’, will show a box like the one shown below. If you had Android Studio installed earlier, then Import settings. Otherwise, go with Do not import settings.
Click the OK button.
Step 7:
This will start the Android Studio.
Meanwhile, it will be finding the available SDK components.
If any component is not found, Android Studio will download it. Be sure to be connected to the internet.
Step 8:
After completing Step 7, it will redirect to the Welcome dialog box.
Click on next.
Step 9:
Choose Standard and click on Next.
Now choose the theme you like, whether the Light theme or the Dark one.
Click on the Next button
Step 10:
Then you’ll need to download various SDKs, emulators, and other necessary tools.
Click on Finish.
The components will be started downloading.
Your Android Studio has been successfully configured.
Get SNIGDHO’s stories in your inbox
Join Medium for free to get updates from this writer.
Click on the Finish button to launch it.
Step 11:
Click on ‘Start a new Android Studio Project’ or ‘Start a new Flutter Project’ to build a new app.
Android Studio is a great IDE for Android app development. Now it supports Flutter development, which allows the development of apps for both Android and iOS. It has great features including a lot of library support, a beautiful & elegant user interface, speedy performance, etc. Visit here to know more.
Build/Run Issues in Android Studio & How to Handle
Issue: Android SDK is not found
Solution: You’ll need Android SDK to run and build your application. You may face an issue that says that Android SDK is not found. In this case,
- Go to File
2. Then Click on Project Structure
You’ll see a box like this.
3. Go to the SDK location & then give the address of your SDK in the box of the Android SDK location. You’ve installed the Android SDK while installing Android Studio.
Issue: JDK is not found
Solution: The Java Software Development Kit is the main SDK that you will need to run an Android app if it is written in Java. Android apps are created with Java. If you have an issue with JDK, then first of all download the JDK from here (it is recommended).
You’ll find your desired JDK here.
After downloading install it like a normal file. Remember where are you installing your JDK. To specify the location of your JDK,
- Go to File
- Then Click on Project Structure
You’ll see a box like this.
3. Go to the SDK location, and then give the address of your SDK in the box of the JDK location.
Issue: Android SDK Environment variable is not detected / not found
Solution: This problem is related to environmental variables, and fixing this is necessary. To fix this,
- Type Edit the system environment variables in the search bar and open it (If you are on Windows 8 or 10). You’ll see a box like this.
2. Click on Environment Variables. A box will pop up.
My Android Environment Variable is already set. But I’ll tell you how you can do it.
4. Click on New of the box of Uses variable for Lenevo (here I’m using Lenovo, that’s why Lenovo is written there. Your PC will refer to your PC company name like HP, etc, or by default, it will be My PC.)
5. A box named New User Variable will be opened. Give the variable name to ANDROID_HOME & variable value to the path where your Android SDK is installed. Then click OK.
Primarily these are few issues that are often found. Beginners face this kind issues. Hope this will be helpful to you. Thank you.
Now let me introduce you to a new app which is OpenMRS. It is an open-source medical record system. Anyone can use it. Let’s see how to run the application on Android Phone.
Step 1:
Go to https://github.com/openmrs/openmrs-contrib-android-client .
Step 2:
Clone or download the repository.
Step 3:
Go to the location where you have downloaded the repository and extract the zip file.
Step 4:
Open Android Studio & then click on Import project.
Step 5:
Go to the location where you have extracted the zip file.
Step 6:
Find the build.gradle file & then click on import.
Step 7:
The dependencies will now load and download from Maven. Remember that you should have the latest SDK and build tools installed.
Step 8:
All done. Now run the app. To run the app on any device you’ll need an emulator or an Android phone connected to your PC through USB.
It was created by Snigdho with my knowledge and learnings. I haven’t copied any piece of content from any other resources to complete this task.








