Android Studio reported an error Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT (solution)

The following error occurred after running Android Studio
Emulator: Process finished with exit code 1
Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT

Emulator: Process ended and exit code 1
Emulator: Panic: AVD system path not found. Please define ANDROID_SDK_ROOT

The solution is as follows:

1. First delete all downloaded AVDs

Open like this

Insert picture description here

At this point, delete everything here

Insert picture description here

2. Configure computer environment variables

It's more detailed, and I will set it up and look down directly
Right-click this computer and click Properties

Insert picture description here

Click Advanced system settings

Insert picture description here

Click on environment variables

Insert picture description here

Create two new variables

Insert picture description here

ANDROID_HOME: SDK file path
ANDROID_SDK_HOME: AVD file path, we create an empty folder of AVD, when we download AVD again, it will be automatically configured to the path we established

Then keep clicking OK to exit
Finally, restart Android Studio, download and create the mirror again, and then run it again.
If not, try to restart the computer and do it again.

The variable value is like this, because I set the directory in advance.
You can look at the detailed steps of Android Studio installation and configuration (super detailed) . I told you in advance, but your specific situation may be different from mine. Choose the appropriate folder according to your situation.

If my article is helpful to you, please give me a like to support it, thank you!
Insert picture description here

Come on!

Work together!

Keafmd

Guess you like

Origin blog.csdn.net/weixin_43883917/article/details/108952288