Android Studio is one of the best programs for developing Android apps. It offers a plethora of built-in features and tools for building professional Android apps.
The program includes a feature-rich Android emulator, testing tools, and a consistent development environment. Moreover, it also has a smart code editor that provides you with advanced code suggestions.
Due to many configuration steps, Android Studio can be difficult to configure if you are a novice developer. Here we show how to install Android Studio on Windows and create a sample application.
How to download and install the Java JDK
Before installing Android Studio, you must first install the Java JDK and configure the Java environment to start working on it.
The Java Development Kit (JDK) is a development package required to create Java-based applications. Moreover, it also includes tools for developers to test applications coded in Java.
Follow these steps to get the latest version of Java JDK for Windows and configure it:
- Go to the official Oracle Java downloads page.
- Choose the latest version of Java JDK and download the x64 MSI Installer under the the Windows tongue.
- Open the file you just downloaded from the Downloads case.
- Follow the onscreen instructions to install the latest Java JDK.
Now that you have successfully installed JDK, you need to set up a Java environment so that Android Studio can easily find the location of Java on your desktop.
Configuring the Java environment
Here are the steps to configure the Java environment:
- Open Windows search and type “Edit environment variables”.
- Hit it Walk in key to open the Environment variables the window.
- Now under the System Variables section, click Path > Modify > New
- Copy the path to the folder where the JDK binaries are installed. For example, in our case, the path is C:Program FilesJavajdk-126.96.36.199bin
- Switch to the Environment Variables window and paste the path you copied and save changes.
- Then under the User Variables section, click New.
- To add PATH_HOME in the variable name box and C:Program FilesJavajdk-188.8.131.52 in the variable value area.
- Finally, save the changes by clicking on OKAY.
Remember to change the JDK version to the version you are currently using. In our case, we used the jdk-184.108.40.206 version.
In general, you don’t need to reconfigure environment variables if you’ve already done so. But if it’s your first time, setting variables will help you reduce Java-based errors when compiling.
How to Install Android Studio on Windows
Follow these steps to download and install Android Studio for Windows:
- Visit the Android developer website and click Download Android Studio.
- Now open the downloaded file to install Android Studio.
- Click on Next to continue installing Android Studio.
- Further, click Install and wait while Android Studio installs on your PC.
- When finished, click Finish to close the installer and start Android Studio.
- Android Studio will now prompt you to import the settings. Click on OKAY to continue setting up Android Studio.
You should use SSD storage when working with Android Studio for better performance and faster processing. Also, if you want to know more about the reasons, we have already covered why SSDs are better than HDDs.
If the installer crashes or closes with a random error code, your PC probably doesn’t meet the minimum system requirements. For this, you need to check the requirements mentioned below once.
System requirements for Android Studio on Windows
Your PC must meet the following requirements to run Android Studio effectively:
- Microsoft Windows 8/10/11 64 bit operating system.
- Minimum screen resolution of 1280 x 800.
- x86_64 processor architecture; 2nd Generation Intel Core or newer; or AMD processor with hypervisor support.
- 8 GB of RAM or more.
- 12 GB of available disk space is required (IDE + Android SDK + Android Emulator).
If you’re unsure of your PC’s specs, check out our guide on how to check a PC’s hardware specs.
If your PC is too old or does not meet the above requirements, you will not be able to install the program correctly. And so, it will be a waste of time for you to proceed with the steps.
How to configure Android Studio on Windows
While you have installed Android Studio on your Windows PC, to create a new project, you will need to configure the setup wizard. The setup wizard will help you create a development environment for your future projects.
Follow these steps to configure Android Studio:
- In the Setup Wizard window, select the Standard option to apply recommended settings and click Next.
- Then select a theme you want and click Next again to verify the settings you have configured.
- On the next screen, select Accept and click Finish to apply the changes.
- Wait for the installation wizard to download some required files. This may take around 15-30 minutes, depending on your network speed.
- Once the download is complete, click Finish to complete the setup process.
If it freezes while downloading, it is because of high CPU usage or download interruption. This is why you should close all programs that may be consuming the internet or still running in the background.
To resolve this issue, we recommend that you read our article on how to fix high CPU usage issue in Windows. Also, if you are having slow downloading issues, learn some effective ways to check internet throttling in Windows.
How to create a new test project in Android Studio
Now that you’ve installed and configured Android Studio, follow these steps to run a test project from scratch:
- Open Android Studio and click New project.
- Select the Basic activity option and click Next for further.
- On the next screen, enter a name for your application and select the language (for example, Java).
- Then select the Minimal SDK for your application. Minimum SDK defines the minimum version of Android needed to run your test application.
- When finished, click Finish to generate a new test project.
- Finally, click Allow access on the next screen to allow ADB to access your public network.
- That’s it. Now you can make changes to your test project and build your Android app.
The first test project takes about 10-15 minutes to load all files and sync the project using Gradle (a build automation tool). Once done, you can interact with your app’s project structure and view different activities in Android Studio.
After making changes to your project, you have many options for running your test application:
- Device Manager: You can create a new emulator from the device manager and run your application there. However, the emulator consumes a large number of resources, so we do not recommend using this option if you are using a low-end PC.
- Pair devices using Wi-Fi: You can also run the test app on your Android smartphone. The only condition here is that your smartphone and your PC are connected to the same Wi-Fi network.
- AfDB Connection: Finally, you can use a USB cable and enable USB debugging on your phone to run your app over an ADB connection.
Application development made easy with Android Studio
Undoubtedly, Android Studio is a robust app development software. The best part is that you are not limited to Android apps only. With Android Studio, you can create apps for tablets, watch faces for Wear OS, and even apps for your Android TV.
Moreover, Android applications are developed in Java (or Kotin) and rely on XML. So, if you are new to app development, you should enroll in some app development courses.