Android Studio 3.0.1 Shows Emulator: Process finished with exit code 1

跟風遠走 提交于 2019-12-05 07:20:49

I had this problem solved this way

1.set place save AVD to environment

$ sudo nano /etc/environment 
$ ANDROID_AVD_HOME=/root/.android/avd

2.set place emulator in sdk to bash profile

$ sudo nano /etc/bash.bashrc
$ export ANDROID_HOME=${HOME}/Android/Sdk
$ export PATH=${PATH}:${ANDROID_HOME}/emulator

now reset studio and run emulator if you see this error when start emulator

libGL error: unable to load driver: i965_dri.so

AVD Emulator: Process finished with exit code -1

do it this work

$ cd ~/Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6

I think you should open terminal in android studio and then enter emulator -list-avds It will tell you every virtual device created if the list is empty then create a new virtual device else press emulator @YOUR_AVD_NAME and avd will start

For windows users, see the ANDROID_SDK_HOME path,then check the ANDROID_SDK_HOME/avd/,is there that Emulator(you just created) existed?If there's not existed,then copy the emulator.avd and emulator.ini files in ANDROID_SDK_HOME/.android/avd/ to ANDROID_SDK_HOME/avd/, finally it did worked!

To avoid any type of errors, I launch the AVD directly from the terminal with this command:

/<path to sdk location>/tools/emulator -avd <AVD name> -use-system-libs
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!