Home » Android » java – Android Studio emulator is not working

java – Android Studio emulator is not working

Posted by: admin June 15, 2020 Leave a comment

Questions:

i´ve searched about an awnser for this problem, tried many things, but still it doesn’t Work.
I’m using a win7 64-bit version.
I’ve set the ANDROID_SDK_HOME variable and… nothing.
With the path: C:\Users\Nuno\Favorites\.android\avd

The error is this:

Cannot launch AVD in emulator.
Output:
PANIC: HOME is defined but could not find PhoneTest.ini file in $HOME\.android\avd
(Note: avd is searched in the order of $ANDROID_AVD_HOME,$ANDROID_SDK_HOME\.android\avd and $HOME\.android\avd)

Can someone help me?

How to&Answers:

It’s working now!

How did i solved?
I copied the AVM’s i created from c:\user\favorites.android\avd and pasted them at c:\user.android\avd.

Tbh i don’t know why this happened but when i installed Android studio it created the first directory to put the avd’s, while the HOME variable points to the second directory.

After that i had a second problem, it said it couldn’t create the temp file… I just had to execute Android studio with administrative privileges.

I hope it helps.

Answer:

I was facing same issue when installed and configured android studio on ubuntu 14.04 (64 bit).

After installation android studio successfully, when I run my app, I faced below issue:

Cannot launch AVD in emulator. Output: PANIC: HOME is defined but
could not find Nexus_5_API_21.ini file in $HOME/.android/avd (Note:
avd is searched in the order of
$ANDROID_AVD_HOME,$ANDROID_SDK_HOME/.android/avd and
$HOME/.android/avd)

I discovered reason of issue and find solution of the same. Reason was that I had downloaded android_studio at home directory (path:/home/ubuntu/android_studio). When I started studio (by using command: $sudo sh /home/ubuntu/android_studio/bin/studio.sh), which is actually installed at path /root/, it is trying to access “root” user files at path /root/.android/avd

Ready to use solution is:
Use command with root user ie

#sh /home/ubuntu/android_studio/bin/studio.sh

in place of of

$sudo sh /home/ubuntu/android_studio/bin/studio.sh

Answer:

Im glad you have solved the problem.
This is the ubuntu version of your problem.
This explains why you need to admin privileges.

Answer:

Add environment variables ANDROID_AVD_HOME or ANDROID_SDK_HOME as your emulator really in(show in capture below). avd manager create emulator in maybe in another directory(default C:\Users[User Name].android\avd on Windows).
As message show in tips, avd will search xxxx/.android/avd. So you setting environment variables above can solve the problem.
enter image description here

Answer:

When AS was updated in Parallels and HAXM was installed after disabling Hyper-V, for me, the new avds somehow found their way into the Mac’s .android folder? I previously installed AS on the Mac but wanted to separate Xcode and AS, so I used Windows for AS and uninstalled it on the Mac. When I opened AS from the dock, it was as if it was a fresh install and I didn’t import settings…

Solution was to grab all my old emulators (folders and .ini files) and pasted them into the Window’s .android/avd folder.

Answer:

Worked with me by setting the variable ANDROID_SDK_HOME and path D: \ ANDROID_SDK in S.O Windowns 7 Thanks

Answer:

I might not be answering your question but I strongly encourage you to switch for a new Android Emulator. Works prietty good for me:

Genymotion Home Page