6

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

Adeel
  • 2,901
  • 7
  • 24
  • 34
Asifur Rahman
  • 61
  • 1
  • 1
  • 5

4 Answers4

13

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
Reza Esfandiari
  • 838
  • 10
  • 13
0

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

Anuj Kumar
  • 1,092
  • 1
  • 12
  • 26
0

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
Marco Gomiero
  • 41
  • 2
  • 7
0

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!

Yuer_1008
  • 261
  • 3
  • 2