I faced the same problem when installing and setting up Android studio on ubuntu 14.04 (64 bit).
After successfully completing the installation of Android Studio, when I launch the application, I encountered the problem below:
Unable to start AVD in emulator. Exit: PANIC: HOME is detected, but the Nexus_5_API_21.ini file could not be found in $ HOME / .android / avd (Note: avd is executed in the order of $ ANDROID_AVD_HOME, $ ANDROID_SDK_HOME / .android / avd and $ HOME / .android / A)
I found the cause of the problem and found a solution to it. The reason is that I uploaded android_studio to my home directory (path: / home / ubuntu / android_studio). When I started the studio (using the command: $ sudo sh / home / ubuntu / android_studio / bin / studio.sh), which is actually installed in path / root /, it tries to access the "root" user files along the path / root /.android/avd
A ready-to-use solution is: Use the command with the root user, i.e.
#sh /home/ubuntu/android_studio/bin/studio.sh
instead
$sudo sh /home/ubuntu/android_studio/bin/studio.sh
Raj khurana
source share