ERROR: ANDROID_SDK_ROOT is undefined

  Emulator: emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.

  Emulator: emulator: ERROR: ANDROID_SDK_ROOT is undefined

  Emulator: Process finished with exit code 1

第一步:确保你选择的cpu架构的系统映像已经下载,我之前用的是x86镜像,现在改成armeabi-v7a,所以在它前面打上勾,下面的x86去掉勾,apply。

ERROR: ANDROID_SDK_ROOT is undefined_第1张图片

invalidate caches/restart 之后还报错的话,进行第二步:

进入到这个目录:C:\Users\wadew\AppData\Local\Android\Sdk\system-images

把google_apis下面的kernel-ranchu复制到default文件夹下面

ERROR: ANDROID_SDK_ROOT is undefined_第2张图片

ERROR: ANDROID_SDK_ROOT is undefined_第3张图片

 

参考文章:

https://lengerrong.blogspot.com/2017/04/error-this-avds-configuration-is.html

https://stackoverflow.com/questions/36729150/is-it-possible-to-run-android-device-emulator-via-android-studio-2-on-vmware

你可能感兴趣的:(Android)