Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm new to Linux. Recently I installed Android Studio 3.0.1. When I try to create new AVD that time it shows me this error. Please, someone, help me to fix it.

7:02 PM Emulator: emulator: ERROR: Unknown AVD name [New_Device_API_26], use -list-avds to see valid list.

7:02 PM Emulator: Process finished with exit code 1

7:10 PM Emulator: emulator: ERROR: Unknown AVD name [New_Device_API_26], use -list-avds to see valid list.

7:10 PM Emulator: Process finished with exit code 1

7:10 PM Emulator: emulator: ERROR: Unknown AVD name [New_Device_API_26], use -list-avds to see valid list.

7:10 PM Emulator: Process finished with exit code 1

enter image description here

like image 485
Asifur Rahman Avatar asked Feb 12 '18 13:02

Asifur Rahman


1 Answers

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
like image 198
Reza Esfandiari Avatar answered Nov 15 '22 01:11

Reza Esfandiari