Android studio遇到问题:Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT

Foreword:     

        When using android studio, I kept reporting this error when configuring the emulator, and then found the problem on the Internet, and actually solved the problem, record it here

table of Contents:

problem causes:

Without configuring the environment, it is because he is looking for the AVD of this path by default: the problem is obvious, and it is caused by the Chinese path

C:\Users\your own name\.android\avd

Solution:

1. Delete all AVDs installed

2. Change the AVD path, rename the avd under your c drive to AVD, copy a copy and put it under the D drive (D:\ruanj\Android) (personal operation, the AVD folder is necessary, but the contents inside It is not necessary, you can also create a new AVD folder in D drive)

3. Configure environment variables

(1) This computer-"Advanced system settings-"Environment variables-"System variables

(2) Add two sentences to the path

(3) Click OK

4. Reinstall an AVD and run it again

(1) Open New

(2) Choose a specification

(3) Continue to select picture materials, you need to download about 1 G! Just follow the picture below!

(4) The next step after completion is to name it, you don’t need to change his, just use his, click Finish

(5) Restart Android studio and see these two things.

4. Click to start the service, you can see our simulator

Reference address: 1https://blog.csdn.net/qq_41138191/article/details/104354529 

                  2 https://blog.csdn.net/qq_41976613/article/details/91432304


problem causes:

If the environment is not configured, it is because he is looking for the AVD of this path by default: the problem is obvious, and it is caused by the Chinese path

C:\Users\your own name\.android\avd

Solution:

1. Delete all AVDs installed

2. Change the AVD path, rename the avd just under your c drive to  AVD , copy a copy and put it under the D drive (D:\ruanj\Android) (personal operation, the AVD folder is necessary, but the contents inside It is not necessary, you can also create a new AVD folder in D drive)

3. Configure environment variables

(1) This computer-"Advanced system settings-"Environment variables-"System variables

Create two new ones : the first is the Android SDK , the second is the AVD folder under the D drive just now

ANDROID_HOME    D:\ruanj\android-sdk-windows
ANDROID_SDK_HOME  D:\ruanj\Android\AVD   

(2) Add two sentences to the path

%ANDROID_HOME%\platform-tools
%ANDROID_HOME%\tools

(3) Click OK

4. Reinstall an AVD and run it again

(1) Open New

(2) Choose a specification

(3) Continue to select picture materials, you need to download about 1 G! Just follow the picture below!

Insert picture description here

Insert picture description here

Insert picture description here

Insert picture description here

(4) The next step after completion is to name it, you don’t need to change his, just use his, click Finish

(5) Restart Android studio and see these two things.

4. Click to start the service, you can see our simulator

Reference address: 1 https://blog.csdn.net/qq_41138191/article/details/104354529 

                  2 https://blog.csdn.net/qq_41976613/article/details/91432304

Guess you like

Origin blog.csdn.net/qq_41619796/article/details/115126737