AndroidGoogleTechnologies

Android Studio Configuration 2026: Complete Beginner to Advanced Guide

Modern Android Development Environment Setup, JDK, Gradle, SDK, Emulator, ADB, USB Debugging, VM Options, Proxy, Environment Variables & Performance Optimization

AI in Android Studio – Android Developers

Android Studioエミュレータの作成方法|Code for Fun

Instalando Android SDK pelo Android Studio

Tutorial version: November 2026
Latest stable release checked: Android Studio Rabbit 2 (2026.2.2)
Platform: Windows, macOS and Linux
Level: Beginner to Advanced
Official documentation: Android Developers

1. Introduction: Why Android Studio Configuration Matters

Android application development is no longer limited to writing Java or Kotlin code and pressing the Build button. A modern Android development environment consists of several interconnected technologies, including Android Studio, Java Development Kit (JDK), Gradle, Android Gradle Plugin (AGP), Android SDK, SDK Build Tools, Platform Tools, Android Emulator and physical testing devices.

Each component has a different responsibility.

For example, Android Studio provides the development interface, Gradle manages the build process, the JDK provides the Java runtime and compiler environment, and Android SDK supplies the libraries and platform tools required to build Android applications.

If these components are configured incorrectly, developers may experience problems such as:

  • Gradle sync failures.
  • Unsupported Java or JDK versions.
  • Android SDK package errors.
  • Emulator startup failures.
  • ADB device detection problems.
  • Slow project indexing and builds.
  • Dependency download failures.
  • Android Studio memory issues.

A properly configured development environment reduces these problems and makes application development more predictable.

This tutorial explains how to configure Android Studio using the official Android development documentation and current technologies available in November 2026.

2. Download and Install the Latest Android Studio

Android Studio Build — документация AndroidAPS 3.4

androidaps.readthedocs.io

Android Studio is Google’s official Integrated Development Environment (IDE) for Android application development.

An IDE is software that combines a code editor, project management, debugging, building and testing tools into one working environment.

2.1 Latest stable version in November 2026

According to the official Android Developers release information, the latest stable release checked for this tutorial is:

InformationVersion
IDEAndroid Studio
Release nameRabbit 2
Version2026.2.2
Release channelStable
Android Gradle Plugin compatibility7.1–9.5

Do not confuse a stable release with a Canary or Preview release. Preview versions provide early access to new features but may contain bugs or incomplete functionality.

Official download:Download Android Studio — Official Website

Release information:Android Studio Rabbit 2 Release Notes

2.2 Windows installation

Follow these steps:

  1. Open the official Android Studio download page.
  2. Download the Windows .exe installer.
  3. Run the downloaded installer.
  4. Follow the installation wizard.
  5. Keep Android Studio and Android Virtual Device components selected.
  6. Complete the installation.
  7. Launch Android Studio.
  8. Select the Standard installation option if you are a beginner.
  9. Accept the Android SDK licences.
  10. Allow the setup wizard to download the required SDK packages.

The first installation may take some time because Android Studio downloads additional development components.

2.3 Standard versus Custom installation

Standard installation is suitable for most beginners. It automatically configures common development components.

Custom installation is useful when you need to control:

  • Android SDK installation location.
  • User interface theme.
  • Emulator configuration.
  • SDK packages.
  • Download locations.

For a development computer with limited storage, selecting a separate SSD or suitable secondary drive for SDK and project files can help manage disk usage.

3. Understand the Android Studio Development Architecture

Before changing advanced settings, it is important to understand how the different components work together.

Android Gradle plugin, Gradle version, and Android Studio compatibility | by KmDev | Medium

medium.com

A typical Android application build follows this sequence:

  1. Developer writes application code in Kotlin or Java.
  2. Android Studio manages the project and provides development tools.
  3. Gradle reads the project build configuration.
  4. Android Gradle Plugin handles Android-specific build operations.
  5. JDK provides the Java runtime and compiler tools required by the build.
  6. Android SDK provides Android platform APIs and build resources.
  7. Build Tools package and prepare application resources.
  8. Gradle generates the APK or Android App Bundle.
  9. ADB or Android Studio deploys the application to a device or emulator.

The main components are explained below.

ComponentPrimary responsibility
Android StudioDevelopment environment
JDKJava runtime and compiler
GradleBuild automation
AGPAndroid-specific Gradle integration
Android SDKAndroid development APIs
Build ToolsAPK and resource packaging
Platform ToolsADB and device communication
EmulatorVirtual Android device

This separation is important because updating one component does not automatically mean that every other component should also be updated.

4. Configure the Java Development Kit (JDK)

Android Studio [Gradle JDK] – 技术栈

jishuzhan.net

The Java Development Kit is one of the most important components of the Android build environment.

Although Android applications can be written using Kotlin, Java-based development tools remain essential to the Android build ecosystem.

4.1 What is the JDK?

JDK stands for Java Development Kit.

It includes:

  • Java runtime components.
  • Java compiler.
  • Development utilities.
  • Supporting libraries and tools.

Gradle runs on a Java Virtual Machine (JVM), so the JDK version must be compatible with the Gradle version and the Android Gradle Plugin used by your project.

4.2 Android Studio’s built-in JDK

Modern Android Studio distributions include JetBrains Runtime (JBR), a customised Java runtime based on OpenJDK.

For most developers, the bundled runtime is the simplest starting point.

You do not need to install a separate Oracle JDK simply because you are developing Android applications.

The important point is to select a compatible JDK for Gradle.

4.3 JDK configuration in Android Studio 2026

Open your Android project.

Navigate to:

File → Settings → Build, Execution, Deployment → Build Tools → Gradle

On macOS, use:

Android Studio → Settings → Build, Execution, Deployment → Build Tools → Gradle

Find the Gradle JDK setting.

Depending on the project and Android Studio version, you may see options such as:

  • GRADLE_LOCAL_JAVA_HOME
  • JAVA_HOME
  • jbr-17
  • Other detected JDK installations.
  • Download JDK.

For newly created projects, the recommended GRADLE_LOCAL_JAVA_HOME option uses the Java home defined in the project’s Gradle configuration properties. Its default points to the bundled JetBrains Runtime.

4.4 Understanding the JDK selection priority

There is an important distinction between the JDK used by Android Studio itself and the JDK used to execute Gradle builds.

The environment variables and runtime selection should not be treated as one universal priority list.

The Android Studio IDE normally uses its bundled JetBrains Runtime unless specifically overridden.

Gradle uses the JDK selected in the Gradle settings or the project’s supported daemon JVM configuration.

The following environment variables can also be relevant:

VariablePurpose
STUDIO_JDKOverrides the JDK used by Android Studio
JDK_HOMEIdentifies a JDK installation
JAVA_HOMECommon Java development environment variable
GRADLE_USER_HOMEControls Gradle user data and cache location

For most projects, use the bundled runtime or the recommended project-specific Gradle JDK configuration rather than changing every environment variable manually.

4.5 Verify Java installation

Open Command Prompt or PowerShell:

java -version

Check the Java compiler:

javac -version

Check the configured Java home:

echo $env:JAVA_HOME

Remember that java -version displays the Java executable found through your current environment. It does not necessarily prove which JDK Android Studio uses for its Gradle build.

Official reference: Java Versions in Android Builds

5. Configure Android Gradle Plugin (AGP) and Gradle

Android Studio – Edit files visible in project view – Stack Overflow

stackoverflow.com

Gradle is the build automation system used by Android Studio. It manages dependencies, compiles source code, processes resources and generates application packages.

The Android Gradle Plugin (AGP) extends Gradle with Android-specific capabilities.

5.1 Understanding the difference

These three technologies have different responsibilities:

  • JDK: Runs the Java-based build environment.
  • Gradle: Controls the build process.
  • AGP: Adds Android application build functionality to Gradle.

All three must be compatible.

5.2 Current compatibility example

For the latest AGP 9.5.0 release checked in October 2026, the official compatibility information specifies:

ComponentRequired/default version
Android Gradle Plugin9.5.0
Gradle9.6.0
JDK17
SDK Build Tools36.0.0
Maximum supported Android API37

These are the requirements for that particular AGP release, not a recommendation to upgrade every existing project automatically.

Official references:

5.3 Check the Gradle version

Open your Android project and locate:

gradle/wrapper/gradle-wrapper.properties

A typical configuration looks like this:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists

distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip

zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

This file controls which Gradle distribution the project uses.

Do not copy this version blindly into an older project. Always check its AGP compatibility first.

5.4 Understand the Android project configuration

Modern Android projects commonly use Kotlin DSL (.gradle.kts) or Groovy DSL (.gradle).

For example:

Kotlin DSL:

plugins {
    id("com.android.application") version "9.5.0" apply false
}

This is an illustrative plugin declaration. Your project should use a compatible Gradle wrapper and the correct plugin configuration.

5.5 Build the project from the command line

Open a terminal in your project root.

On Windows:

.\gradlew.bat --version

Build the debug APK:

.\gradlew.bat assembleDebug

Run a clean build:

.\gradlew.bat clean
.\gradlew.bat assembleDebug

The generated debug APK is normally located at:

app/build/outputs/apk/debug/app-debug.apk

The Gradle Wrapper is preferred because it allows a project to use its defined Gradle version instead of depending on an arbitrary globally installed version.

6. Configure Android SDK

Getting started with Vulkan on Android  |  Android Developers

developer.android.com

Android SDK stands for Android Software Development Kit.

It contains the platform APIs, build resources, command-line utilities and other packages required for Android application development.

Without a properly configured SDK, Android Studio cannot compile and package Android applications.

6.1 Open SDK Manager

Open Android Studio and navigate to:

File → Settings → Languages & Frameworks → Android SDK

The exact navigation may vary between Android Studio versions and project states. You can also open SDK Manager from the toolbar.

The SDK Manager has two important sections:

  1. SDK Platforms
  2. SDK Tools

6.2 SDK Platforms

SDK Platforms contains the Android platform versions available for development.

Each Android platform has an API level.

For example:

  • API level 34 represents Android 14.
  • API level 35 represents Android 15.
  • API level 36 represents Android 16.
  • API level 37 represents the corresponding newer platform level.

The exact API support available depends on the installed platform and the Android Gradle Plugin version.

You do not need to install every Android platform. Install the platforms required by your applications and testing targets.

6.3 SDK Tools

SDK Tools contains utilities required for application development.

Important packages include:

ToolPurpose
Android SDK Build ToolsBuilds and packages applications
Android SDK Platform ToolsDevice communication tools
Android SDK Command-line ToolsSDK management utilities
Android EmulatorRuns virtual Android devices
Google USB DriverWindows USB debugging support for supported Google devices
NDKNative C/C++ development
CMakeNative build configuration

For a normal Kotlin or Java Android application, you generally do not need to install NDK and CMake unless your project requires native code.

6.4 Recommended SDK configuration procedure

  1. Open SDK Manager.
  2. Select the Android platform required by your project.
  3. Open the SDK Tools tab.
  4. Select Android SDK Build Tools.
  5. Select Android SDK Platform Tools.
  6. Select Android SDK Command-line Tools.
  7. Select Android Emulator if you intend to use virtual devices.
  8. Click Apply.
  9. Accept the licences.
  10. Wait for installation to finish.

Avoid installing unnecessary SDK packages because they consume disk space.

Official reference:Android Studio and SDK Updates

7. Configure Android SDK Environment Variables

Environment variables allow Windows and other operating systems to locate Android development tools without requiring their full directory paths.

For example, instead of typing the complete path to ADB every time, you can execute:

adb devices

This works when the Platform Tools directory is included in the system PATH.

7.1 Find the Android SDK location

The default Windows SDK location is generally:

C:\Users\YourUserName\AppData\Local\Android\Sdk

The actual path can be different if you selected a custom SDK location during installation.

7.2 Create ANDROID_HOME

On Windows:

  1. Open Start.
  2. Search for Environment Variables.
  3. Select Edit the system environment variables.
  4. Click Environment Variables.
  5. Under User variables, click New.
  6. Enter the following:

Variable name:

ANDROID_HOME

Variable value:

C:\Users\YourUserName\AppData\Local\Android\Sdk

Replace YourUserName with your actual Windows account folder.

7.3 Configure PATH

Under User variables, select Path and click Edit.

Add these entries:

%ANDROID_HOME%\platform-tools
%ANDROID_HOME%\emulator
%ANDROID_HOME%\cmdline-tools\latest\bin

Click OK to save your changes.

Open a new terminal to load the updated environment.

7.4 Verify the configuration

Run:

echo $env:ANDROID_HOME

Then:

adb version

Finally:

sdkmanager --version

If these commands work, your terminal can locate the corresponding Android development tools.

Important: ANDROID_HOME is the recommended SDK environment variable. ANDROID_SDK_ROOT is a legacy variable and should not be introduced unnecessarily. If both are defined, make sure they point to the same SDK location.

Official reference:Android SDK Command-line Tools

8. Customize Android Studio Using studio.vmoptions

Android Studio (Dolphin | 2021.3.1) & (Electric Eel | 2022.1.1) does not show layout preview – Stack Overflow

stackoverflow.com

Android Studio is a Java-based development environment. It uses JVM memory to run the IDE, manage project indexing and provide development services.

The studio.vmoptions file allows developers to customize certain JVM startup settings.

8.1 What is studio.vmoptions?

This file can control:

  • Initial JVM heap size.
  • Maximum JVM heap size.
  • Other supported JVM startup options.
  • Garbage collection-related settings.

A common reason for modifying this file is to adjust the maximum heap allocation for large projects.

8.2 Open the configuration file

Inside Android Studio:

Help → Edit Custom VM Options

On macOS, use the corresponding Android Studio menu.

If you have never created this file before, Android Studio will ask permission to create it.

Click Create.

8.3 Example memory configuration

For a suitable machine with sufficient available memory, an illustrative configuration is:

-Xms512m
-Xmx2048m

Explanation:

  • -Xms512m: Sets the initial JVM heap allocation to 512 MB.
  • -Xmx2048m: Sets the maximum JVM heap allocation to 2048 MB.

These values are examples, not universal recommended settings.

A computer with limited RAM should not blindly allocate 2 GB or more to the IDE. Android Studio, Gradle, the operating system and an emulator may all require memory simultaneously.

8.4 Use Android Studio Memory Settings

Modern Android Studio also provides a graphical memory configuration interface.

Navigate to:

File → Settings → Appearance & Behavior → System Settings → Memory Settings

You can adjust supported heap settings through this interface.

The IDE may also notify you when it detects an opportunity to improve memory configuration.

8.5 Important warning

Never directly edit the default studio.vmoptions file inside the Android Studio installation’s bin directory.

Use the custom VM options file instead.

This prevents your custom configuration from unnecessarily modifying the original installation defaults.

Official reference:Customize Android Studio VM Options

9. Customize Android Studio Using idea.properties

The idea.properties file controls specific IDE properties and directory locations.

It is particularly useful when working in enterprise environments, restricted Windows computers or systems where default storage locations are unsuitable.

9.1 What can idea.properties control?

Examples include:

  • IDE system directory.
  • IDE configuration directory.
  • Plugin directory.
  • Log directory.
  • Other supported IntelliJ Platform properties.

One common use is changing the system directory where Android Studio stores caches and temporary IDE data.

9.2 Open idea.properties

Inside Android Studio, select:

Help → Edit Custom Properties

If the file does not exist, Android Studio can create it.

9.3 Change the IDE system directory

For example:

idea.system.path=C:/WorkFolder/studio/system

This configuration changes the IDE system directory to the specified location.

Before applying it:

  1. Create the destination directory.
  2. Ensure your Windows account has write permission.
  3. Close Android Studio if required.
  4. Save the configuration.
  5. Restart Android Studio.

9.4 Why change the system directory?

Suppose your organisation uses Group Policy to restrict access to certain directories.

The default Android Studio cache directory might be subject to restrictions or antivirus scanning.

Moving the IDE system directory to an approved location may help resolve those environmental problems.

However, do not change the directory simply because a custom path looks more professional.

Official reference:Android Studio Configuration and idea.properties

10. Create and Manage Android Virtual Devices (AVD)

Support 16 KB page sizes  |  Compatibility  |  Android Developers

developer.android.com

An Android Virtual Device (AVD) is a virtual Android device that runs through the Android Emulator.

It allows developers to test applications without requiring a physical Android phone for every development task.

10.1 What is an Android Emulator?

The Android Emulator simulates an Android device on your computer.

It can reproduce different device configurations, such as:

  • Screen dimensions.
  • Android versions.
  • Memory configurations.
  • Device profiles.
  • System images.
  • Hardware characteristics.

10.2 Open Device Manager

Inside Android Studio:

View → Tool Windows → Device Manager

Depending on the interface version, Device Manager may also be accessible through the toolbar.

10.3 Create a virtual device

Follow these steps:

  1. Open Device Manager.
  2. Click Add Device or Create Virtual Device.
  3. Select a device category.
  4. Choose a device profile, such as a Pixel device.
  5. Click Next.
  6. Select an appropriate Android system image.
  7. Download the system image if necessary.
  8. Complete the device configuration.
  9. Click Finish.

Your virtual device should now appear in Device Manager.

10.4 Select an appropriate system image

When choosing an image, consider:

  • Android API level.
  • CPU architecture.
  • Google APIs availability.
  • Google Play support, where needed.
  • Available computer hardware.

An x86_64 image is generally appropriate for supported Intel or AMD Windows/Linux development machines, while ARM64 images are relevant for compatible ARM hardware.

10.5 Run your application

Select your virtual device from the Android Studio device selector.

Click the Run button.

Android Studio will build the project, start the emulator and install the application.

10.6 Emulator performance optimization

Emulator performance depends on:

  • Processor architecture.
  • Available RAM.
  • GPU capability.
  • Virtualization support.
  • System image architecture.
  • Storage performance.

Hardware acceleration can significantly improve emulator performance.

For Windows, Microsoft Windows Hypervisor Platform (WHPX) is the recommended virtualization solution in the current documentation.

An important 2026 update: Android Emulator Hypervisor Driver (AEHD) is scheduled to be sunset on December 31, 2026. Windows users should prepare to transition to WHPX.

To check acceleration status, run:

emulator -accel-check

If the command is not recognized, run it using the full path to the emulator executable.

Official references:

11. Run Android Applications on Physical Devices

How to Enable USB Debugging on Xiaomi Devices – Xiaomiui.Net

xiaomiui.net

Although an emulator is useful, testing on an actual Android device is important before releasing an application.

Physical devices can reveal problems involving:

  • Real hardware sensors.
  • Camera functionality.
  • Device-specific performance.
  • Battery usage.
  • Bluetooth.
  • USB connectivity.
  • Real-world screen behaviour.

11.1 Enable Developer Options

On your Android phone:

  1. Open Settings.
  2. Find About Phone.
  3. Locate Build Number.
  4. Tap Build Number seven times.
  5. Enter your device PIN if requested.
  6. Return to Settings.
  7. Open Developer Options.

The exact location of Build Number depends on the phone manufacturer.

11.2 Enable USB Debugging

Inside Developer Options:

  1. Find USB Debugging.
  2. Enable it.
  3. Connect the phone to your computer using a data-capable USB cable.
  4. Accept the debugging authorization prompt on your phone.

Do not use a charge-only cable because it may not provide data connectivity.

11.3 Verify device connection

Open PowerShell:

adb devices

A successful connection should show an entry similar to:

List of devices attached
ABC1234567    device

Common statuses:

StatusMeaning
deviceDevice connected and authorized
unauthorizedAuthorization not yet granted
offlineDevice is not communicating correctly
No deviceADB cannot detect the phone

11.4 Install an APK using ADB

Use:

adb install app-debug.apk

To replace an existing application while preserving its data where permitted:

adb install -r app-debug.apk

11.5 Wireless debugging

Modern Android development also supports wireless debugging.

Android 11 and higher supports pairing a device and workstation over Wi-Fi using Android Studio and ADB.

General procedure:

  1. Connect your phone and computer to the same Wi-Fi network.
  2. Enable Developer Options.
  3. Enable Wireless Debugging.
  4. Select Pair Device with Pairing Code.
  5. Open Android Studio’s Pair Devices Using Wi-Fi interface.
  6. Enter the pairing code.
  7. Complete the pairing process.

This removes the need for a permanent USB connection.

The newer ADB Wi-Fi 2.0 functionality introduced alongside Android 17 and ADB 37.0.0 further improves wireless debugging usability.

Official reference:Run Apps on a Hardware Device

12. Install OEM USB Drivers

Windows sometimes needs a manufacturer-specific USB driver to communicate correctly with an Android phone.

An OEM means Original Equipment Manufacturer.

Examples include Google, Samsung and other Android device manufacturers.

12.1 When do you need a USB driver?

A driver may be required when:

  • Windows does not recognise the phone correctly.
  • ADB cannot detect the device.
  • The phone appears as an unknown USB device.
  • USB debugging does not establish a connection.

Google USB Driver is intended for supported Google devices. Other manufacturers may provide their own drivers.

12.2 Install the driver

For supported Google devices:

  1. Open Android Studio.
  2. Open SDK Manager.
  3. Select SDK Tools.
  4. Find Google USB Driver.
  5. Install the package.

For other brands, download the correct driver from the manufacturer’s official support website.

Do not download random USB drivers from unknown websites.

Official reference:Google USB Driver Installation

13. Configure Android Studio and Gradle Proxy Settings

A proxy server acts as an intermediary between your computer and the internet.

Developers working in corporate networks, restricted environments or certain internet connections may need proxy configuration to download:

  • Gradle distributions.
  • Android SDK packages.
  • Maven dependencies.
  • Google development libraries.
  • Other build dependencies.

13.1 Configure Android Studio HTTP Proxy

Open:

File → Settings → Appearance & Behavior → System Settings → HTTP Proxy

Available configuration options depend on the installed version.

Common options include:

  • No Proxy.
  • Auto-detect proxy settings.
  • Use system proxy settings.
  • Manual proxy configuration.

If your network requires a manual proxy, enter the actual host and port provided by your network administrator.

Use the connection test if available.

13.2 Configure Gradle proxy settings

This is an important correction to the old article.

Gradle proxy properties should not be inserted as arbitrary settings inside the Android module’s build.gradle or build.gradle.kts file.

Instead, use the appropriate gradle.properties file.

For a project-wide configuration, the file is:

YourProject/
    gradle.properties

For a user-level configuration, the usual Windows location is:

C:\Users\YourUserName\.gradle\gradle.properties

The user-level configuration is preferable when the same proxy is needed across multiple projects.

13.3 HTTP proxy example

systemProp.http.proxyHost=proxy.example.com
systemProp.http.proxyPort=8080

systemProp.https.proxyHost=proxy.example.com
systemProp.https.proxyPort=8080

Replace the example host and port with your actual proxy information.

13.4 Authenticated proxy example

If your proxy requires authentication:

systemProp.http.proxyHost=proxy.example.com
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=YOUR_USERNAME
systemProp.http.proxyPassword=YOUR_PASSWORD

systemProp.https.proxyHost=proxy.example.com
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=YOUR_USERNAME
systemProp.https.proxyPassword=YOUR_PASSWORD

Security warning: Never commit a real proxy password to a public GitHub repository. Keep credentials in a private user-level configuration and protect access to that file.

13.5 Configure non-proxy hosts

Some internal services should bypass the proxy.

Example:

systemProp.http.nonProxyHosts=localhost|127.*|*.example.local

Do not use a proxy configuration unless your network actually requires one.

Official reference:Gradle Networking and Proxy Configuration

14. Android Command-line Tools: Advanced Developer Guide

How to Install Android Studio and SDK Tools in Windows – Make Tech Easier

maketecheasier.com

Android Studio provides graphical tools, but professional Android developers also need to understand command-line utilities.

Command-line tools allow developers to perform development tasks without opening the full IDE.

They are particularly useful for:

  • Automated application builds.
  • Continuous Integration and Continuous Delivery (CI/CD).
  • APK inspection.
  • Device debugging.
  • SDK installation.
  • Emulator management.
  • Build troubleshooting.

14.1 Android SDK Command-line Tools

The modern directory structure is:

Android/
└── Sdk/
    └── cmdline-tools/
        └── latest/
            └── bin/
                ├── sdkmanager.bat
                ├── avdmanager.bat
                └── ...

The modern cmdline-tools package replaces the old SDK Tools package.

14.2 sdkmanager

The sdkmanager utility manages Android SDK packages.

List installed and available packages:

sdkmanager --list

Install an Android platform:

sdkmanager "platforms;android-37"

Install Build Tools:

sdkmanager "build-tools;36.0.0"

Install Platform Tools:

sdkmanager "platform-tools"

Accept Android SDK licences:

sdkmanager --licenses

Update installed SDK packages:

sdkmanager --update

The actual package versions should be selected according to your project’s requirements.

14.3 avdmanager

The avdmanager utility creates and manages Android Virtual Devices.

List available device definitions:

avdmanager list device

List available system images:

sdkmanager --list

Create a virtual device:

avdmanager create avd -n Test_Device -k "system-images;android-37;google_apis;x86_64"

The system image must already be installed and compatible with the host computer.

List created AVDs:

avdmanager list avd

14.4 apkanalyzer

apkanalyzer provides information about an APK after the build process.

It can help inspect:

  • APK file size.
  • Application manifest.
  • Package information.
  • DEX information.
  • Resources.

For example:

apkanalyzer apk summary app-debug.apk

This can help developers investigate application packaging and size-related problems.

14.5 lint

Android Lint checks source code and project configuration for potential problems.

Run lint through the Gradle Wrapper:

.\gradlew.bat lint

Lint can identify issues involving:

  • Incorrect API usage.
  • Potential bugs.
  • Resource problems.
  • Accessibility.
  • Performance.
  • Compatibility.

It is good practice to examine lint reports before releasing an application.

14.6 retrace

R8 can obfuscate application code during release builds.

When an application crashes, the resulting stack trace may contain shortened or obfuscated class and method names.

retrace helps map an obfuscated stack trace back to the original source information using the corresponding mapping file.

This is particularly useful when investigating release-only crashes.

14.7 AAPT2

Android Asset Packaging Tool 2 processes Android resources during application builds.

It handles resource compilation, linking and packaging operations.

AAPT2 is normally invoked by the Android build system, so most application developers do not need to run it manually.

14.8 apksigner

apksigner signs Android APK files and verifies their signatures.

To verify an APK:

apksigner verify --verbose --print-certs app-release.apk

This is useful for checking APK signing information before distribution.

14.9 zipalign

zipalign optimizes APK file alignment.

Example:

zipalign -c -v 4 app-release.apk

This checks alignment rather than modifying the APK.

Modern Android Gradle Plugin release workflows normally handle the required packaging and signing operations automatically.

Official reference: Android Command-line Tools Documentation

15. Android SDK Platform Tools: ADB, Logcat and Fastboot

Platform Tools are essential for communicating with Android devices.

The default Windows installation location is:

%ANDROID_HOME%\platform-tools

15.1 ADB — Android Debug Bridge

ADB is a communication utility between a computer and an Android device or emulator.

Important commands:

CommandFunction
adb devicesLists connected devices
adb install app.apkInstalls an APK
adb uninstall package.nameUninstalls an application
adb rebootRestarts a device
adb shellOpens a device shell
adb logcatDisplays system and application logs
adb pullCopies files from a device
adb pushCopies files to a device

15.2 Logcat

Logcat is particularly useful when an application crashes.

Run:

adb logcat

To clear the existing log buffer:

adb logcat -c

To filter Android runtime exceptions:

adb logcat -s AndroidRuntime

For example, if your application closes immediately after launching, Logcat may show a Java or Kotlin exception and the relevant stack trace.

This is often more useful than simply seeing that the application has crashed.

15.3 Fastboot

Fastboot is used for specific bootloader-level operations, such as flashing supported device images.

It is not an ordinary application installation utility.

Incorrect Fastboot commands can damage a device’s software installation or erase user data.

Use manufacturer-specific instructions and official factory images when performing bootloader operations.

15.4 Platform Tools updates

Platform Tools are updated independently of Android Studio.

You can update them through SDK Manager or obtain the official package directly.Download Android SDK Platform Tools

16. Customize Android Studio Directory Locations

Android Studio stores different types of data in different locations.

Understanding these directories is useful when moving projects, managing storage or troubleshooting permission problems.

The following table shows typical Windows locations.

DirectoryDefault location
Gradle cache%USERPROFILE%\.gradle
Android projects%USERPROFILE%\AndroidStudioProjects
Android SDK%LOCALAPPDATA%\Android\Sdk
Android Studio configuration%APPDATA%\Google\AndroidStudio...
Android Studio system files%LOCALAPPDATA%\Google\AndroidStudio...

Actual directory names depend on the installed product version and operating system.

16.1 Change Gradle cache location

Gradle stores downloaded dependencies, distributions and other cached information in its user home directory.

To move it, define:

GRADLE_USER_HOME

For example:

D:\AndroidDevelopment\.gradle

After changing the environment variable, open a new terminal and restart the relevant development processes.

Existing cached dependencies will not automatically appear in the new location.

16.2 Change Android project location

You can create a new project directory, such as:

D:\AndroidProjects

Use this location when creating new projects.

Moving existing projects requires care because local paths, SDK configurations and other project-specific settings may need adjustment.

16.3 Change Android SDK location

Inside Android Studio:

File → Settings → Languages & Frameworks → Android SDK

Change the SDK location to your desired directory.

For example:

D:\AndroidSDK

If you already have an SDK installation, you can copy it to the new location before updating the configuration.

Verify that the new SDK contains the expected packages.

16.4 Antivirus and real-time scanning

Android projects generate many small files during indexing and building.

Real-time scanning of large Gradle caches, SDK directories and project build folders can sometimes affect performance.

If your antivirus product supports exclusions, consider using only appropriate trusted development directories.

Do not disable antivirus protection globally.

Official reference:Customize Android Studio Configuration Directories

17. Android Studio Performance Optimization

Android Studio performance depends on several factors.

Simply increasing the JVM heap size will not solve every performance problem.

17.1 Use SSD storage

Android development generates a large number of files.

An SSD can significantly improve:

  • Project indexing.
  • Dependency extraction.
  • Gradle operations.
  • Emulator startup.
  • File access.

For a large Android project, an HDD can become a noticeable performance limitation.

17.2 Manage RAM usage

Android Studio, Gradle, Kotlin compilation and Android Emulator can all use memory simultaneously.

Avoid allocating excessive memory to one component.

For better performance:

  1. Close unnecessary applications.
  2. Avoid running multiple emulators simultaneously.
  3. Use a suitable emulator configuration.
  4. Keep enough free memory for Windows.
  5. Adjust Android Studio memory settings only when needed.

17.3 Enable Gradle build caching

Gradle supports build caching, which can reuse previously generated build outputs when the relevant inputs have not changed.

In a suitable project, the following setting can be added to gradle.properties:

org.gradle.caching=true

This can improve repeated builds when tasks are cacheable.

17.4 Parallel builds

Gradle also supports parallel project execution:

org.gradle.parallel=true

This is useful for projects with multiple independent modules.

However, it may increase CPU and memory usage.

17.5 Configure Gradle JVM arguments

An illustrative configuration:

org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8

This controls the Gradle build JVM’s maximum heap allocation.

It is separate from the Android Studio IDE heap configured through studio.vmoptions.

Do not confuse these two memory settings.

17.6 Keep development tools updated

Regularly check for compatible updates to:

  • Android Studio.
  • Android SDK Platform Tools.
  • Android Emulator.
  • Android SDK Build Tools.
  • Android Gradle Plugin.
  • Gradle Wrapper.

For an existing production project, check compatibility before updating.

A working project is more valuable than an unnecessary version upgrade.

18. Troubleshooting Common Android Studio Problems

Even after a correct installation, developers may encounter errors. The following solutions cover common situations.

Problem 1: Gradle requires a different Java version

Possible message:

Android Gradle plugin requires Java 17

Cause: Gradle is running with an incompatible JDK.

Solution:

  1. Open Android Studio settings.
  2. Navigate to Build Tools → Gradle.
  3. Check the Gradle JDK selection.
  4. Select a compatible JDK.
  5. Sync the project again.

Do not assume that the system-installed Java version and Android Studio’s Gradle JDK are identical.

Problem 2: SDK location not found

Possible message:

SDK location not found

Cause: The project cannot locate the Android SDK.

Solution:

Check the SDK location in Android Studio.

Also inspect:

local.properties

A Windows project may contain:

sdk.dir=C\:\\Users\\YourUserName\\AppData\\Local\\Android\\Sdk

Use the actual SDK location.

Avoid committing machine-specific local.properties paths to a shared repository.

Problem 3: ADB device not detected

Possible causes:

  • USB debugging disabled.
  • Incorrect USB cable.
  • Missing OEM driver.
  • USB authorization not accepted.
  • ADB process not responding.

Try:

adb kill-server
adb start-server
adb devices

If necessary, reconnect the phone and accept the authorization prompt.

Problem 4: Android Emulator is extremely slow

Check:

  • CPU virtualization support.
  • BIOS virtualization settings.
  • WHPX availability.
  • Emulator system image architecture.
  • Available RAM.
  • Graphics configuration.

Run:

emulator -accel-check

If virtualization is unavailable, investigate your computer’s BIOS and Windows hypervisor configuration.

Problem 5: Gradle cannot download dependencies

Possible causes include:

  • Proxy misconfiguration.
  • Internet connection problems.
  • Repository availability.
  • TLS or certificate errors.
  • Incorrect dependency coordinates.

Check the Gradle proxy configuration and the network connection.

Then try:

.\gradlew.bat --refresh-dependencies

This refreshes dependency resolution and can help diagnose stale dependency cache problems. It is not a guaranteed solution for network failures.

Problem 6: Android Studio consumes too much RAM

Try:

  1. Close unused projects.
  2. Stop unnecessary emulators.
  3. Review IDE memory settings.
  4. Reduce unnecessary background applications.
  5. Check Gradle daemon usage.
  6. Avoid setting unnecessarily high JVM heap limits.

If the computer has limited physical memory, using a physical Android phone instead of an emulator may be more practical.

Problem 7: APK signing verification fails

Check the APK using:

apksigner verify --verbose app-release.apk

Make sure you are using the correct signing configuration and that the APK has not been modified after signing.

19. Android Studio Security and Development Best Practices

A professional Android development environment should not only work correctly; it should also protect source code, credentials and application signing keys.

19.1 Protect signing keys

Android applications distributed to users need appropriate signing.

Never publish your private signing keystore or passwords in a public GitHub repository.

Keep them in a secure location and maintain an encrypted backup.

19.2 Protect API keys

Avoid hardcoding sensitive credentials into publicly accessible source code.

Remember that API keys embedded in an APK can potentially be extracted.

For sensitive operations, use an appropriately secured backend.

19.3 Use Git for version control

Git helps developers track code changes and recover earlier working versions.

Useful commands:

git init
git add .
git commit -m "Initial Android project"

Before making major Gradle or SDK changes, commit your working project.

19.4 Maintain a stable development environment

A professional development workflow should follow these principles:

  • Use stable Android Studio releases for production development.
  • Keep Gradle and AGP compatible.
  • Use project-specific JDK configuration.
  • Keep SDK packages relevant to your projects.
  • Protect signing credentials.
  • Test on physical devices.
  • Review Logcat and lint reports.
  • Back up important source code.

20. Complete Android Studio Configuration Checklist

Use this checklist after installing Android Studio.

Configuration progress

0/20

Install the latest stable Android StudioComplete the initial setup wizardVerify the bundled JDK / Gradle JDKCheck Android Gradle Plugin compatibilityInstall required Android SDK PlatformsInstall Android SDK Build ToolsInstall Android SDK Platform ToolsInstall Android SDK Command-line ToolsConfigure ANDROID_HOMEAdd Platform Tools to PATHCreate and test an Android Virtual DeviceEnable hardware accelerationConnect a physical Android deviceVerify ADB device detectionConfigure proxy only if requiredReview studio.vmoptions if necessaryConfigure idea.properties only if requiredVerify Gradle build and APK generationTest application using LogcatProtect application signing credentials

Reset checklist

21. Official Android Development Documentation and Reference Links

The following are official Google, Android Developers, JetBrains and Gradle documentation sources. They are provided so readers can verify technical details and follow the latest documentation when technologies change.

No.Official referenceTopic
1Android StudioDownload and installation
2Android Studio Release NotesLatest stable release
3Configure Android StudioVM options and IDE properties
4Java Versions in Android BuildsJDK configuration
5AGP 9.5.0 Release NotesCurrent build compatibility
6AGP CompatibilityGradle compatibility
7Android Command-line ToolsSDK management
8Platform ToolsADB and device utilities
9Managing AVDsVirtual devices
10Emulator Hardware AccelerationVirtualization
11Run Apps on Hardware DevicesUSB and Wi-Fi debugging
12Google USB DriverWindows USB driver
13Gradle NetworkingHTTP and HTTPS proxy
14Gradle Build EnvironmentGradle properties
15JetBrains IDE DocumentationIDE configuration

22. Conclusion

Configuring Android Studio correctly is an important part of professional Android application development.

A reliable development environment requires more than installing the IDE. Developers must understand how the JDK, Gradle, Android Gradle Plugin, Android SDK, Build Tools, Platform Tools and Emulator work together.

The most important lesson is to maintain compatibility between these components instead of updating them independently without checking their requirements.

For beginners, the recommended starting point is the stable Android Studio release, its bundled Java runtime, the recommended Gradle JDK configuration, the required Android SDK packages and a working physical device or emulator.

For advanced developers, understanding command-line tools, Gradle caching, proxy configuration, JVM settings, ADB and build troubleshooting provides greater control over the entire Android development process.

Android Studio is the development environment. Your configuration determines how efficiently and reliably you can use it.

Editorial note: This tutorial is based on official documentation checked on November 2, 2026. Android Studio, Gradle, AGP and Android SDK releases may change. Version-specific examples should always be checked against the compatibility documentation before being applied to an existing project.

Suggested WordPress SEO information

  • SEO Title: Android Studio Configuration 2026 – Complete Beginner to Advanced Guide
  • Slug: android-studio-configuration-2026
  • Meta Description: Learn Android Studio configuration in 2026, including JDK, Gradle, Android SDK, Emulator, ADB, USB debugging, environment variables, proxy settings and performance optimization.
  • Focus Keyword: Android Studio Configuration 2026
  • Category: Android Development / Programming Tutorials
  • Tags: Android Studio, Android SDK, JDK, Gradle, Android Emulator, ADB, Kotlin, Android Development

Recommended featured image concept:

Run apps on a hardware device  |  Android Studio  |  Android Developers

developer.android.com

Is this conversation helpful so far?

Related Articles

Leave a Reply

Back to top button