Note the configuration of the Android development environment, so that every time Google.

Java

1. Download and install JDK: Download

2. Set environment variable JAVA_HOME:

C: \ Program Files \ Java \ jdk1.8.0 _201Copy the code

Android Studio

The Android Studio configuration file takes up quite a bit of space on drive C by default, and we need to migrate it (all X’s in the following are drive letters).

1. Create folder X:\Android\setting

2. Copy the idea. Properties file from drive C to here and add two lines of configuration file:

idea.config.path=X:/Android/setting/.AndroidStudio/config
idea.system.path=X:/Android/setting/.AndroidStudio/system
idea.plugins.path=X:/Android/setting/.AndroidStudio/config/plugins
idea.log.path=X:/Android/setting/.AndroidStudio/system/log
Copy the code

3. Set environment variable STUDIO_PROPERTIES:

X:\Android\setting\idea.properties
Copy the code

4. Pay attention to change the configuration file path, plug-in installation does not go up, need to manually download plug-in, and then copied to the plugin directory /. AndroidStudio/config/plugins.

SDK

Create a new directory F:\Android\ SDK and set the SDK directory here in Android Studio.

AVD

The emulator is also on drive C by default, so it also needs to be migrated.

1. Create folder X:\Android\setting

2. Set environment variable ANDROID_SDK_HOME:

X:\Android\setting
Copy the code

Gradle

Gradle’s cache files are also stored on disk C and need to be migrated as well.

1. Create a folder X:\Android\setting\. Gradle

2.Android Studio Settings->Build->Gradle->Gradle user Home:

X:/Android/setting/.gradle
Copy the code

2. Set the environment variable GRADLE_USER_HOME

X:\Android\setting\.gradle
Copy the code