Solve the error "The emulator process for AVD xxx has terminated." when using Android studio

Cause Analysis:

When using Android studio, "The emulator process for AVD Nexus_4_API_27 has terminated." appeared. When I downloaded Android studio, I downloaded it directly to the D drive, and created a new folder SDK to store the content, while Android studio mostly defaults to Use AVD to save under the C drive, and there will be an error that the environment variable is not configured properly, and it may not be able to run. At the same time, because I installed Nexus4 here, the error displayed is also Nexus4. If you have installed other devices, you can also try this solution.

 


solution:

1. In the directory where your Android studio is installed (this is the D drive for me), create a new folder AndroidAVD (not created before), and keep it empty . It is not necessary to copy the contents of the original folder to the newly created AndroidAVD.

 2. Open the environment variable, create a new system variable and edit it. The variable name can be changed to: ANDROID_SDK_HOME (if there is one, it can be changed), and the variable value is D:\AndroidAVD.

/-------------------------------------------------
/-------------------------------------------------
变量名可以改为:ANDROID_SDK_HOME
/-------------------------------------------------
/-------------------------------------------------
变量值为D:\AndroidAVD。
/-------------------------------------------------
/-------------------------------------------------

3. Go back to Android studio, click Create device, select Nexus4, and click Next.

 4. After clicking Next, you can download a new Oreo 27 x86 (Oreo 26 x86 originally downloaded), and run it again. (If you already have it, you can choose to download it again. When downloading, check whether the upper left corner is the location of the new file).

5. At this time, go back to the newly created AndroidAVD folder (it was empty before), and you can find that the storage path has been modified and stored in the AndroidAVD folder, and it can be run at this time.

Guess you like

Origin blog.csdn.net/qq_56017400/article/details/123620273