Table of Contents
Android Studio and Emulators.
I try to occasionally make my own app in Android Studio to earn some extra money, unfortunately this has not been successful yet and I probably missed the train nowadays.
I wanted to try one of my Android applications on an emulator, but I got the following error message:
![PANIC: HOME is defined but could not find Nexus_5_API_22_x86.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).](https://baswijdenes.com/wp-content/uploads/2015/11/error-android-studio-emulator-300x17.png)
An emulator is simulating an application or system. An Android emulator for Android Studio can therefore be different phones so you can test the application well on different devices. For more about emulators, I refer you to Wikipedia.
In the tutorial below, I explain how you can solve the error message.
Let’s fix “PANIC: HOME is defined but could not find Emulator file in $HOME\.android\avd”
I have a work around and a real solution. If you use Android Studio little to nothing, you it’s best to use the work around.
If you use Android Studio for work, it is definitely better to solve the problem immediately.
Workaround
Go to your user folder and click through until you are in the folder ‘avd’.
For me this is (including Onedrive): C:\Users\wortell\OneDrive\.android\avd
![PANIC: HOME is defined but could not find Emulator file in $HOME\.android\avd](https://baswijdenes.com/wp-content/uploads/2015/12/nexus-emulator.jpg)
Here you see all emulators that you have created. As you can see, I only have one and I prefer the workaround.
Copy the Android emulators.
Now go to C:\%usersname%\.android.avd and paste the Android emulators in this folder.
Re-start your computer and try again.
Let’s just fix “PANIC: HOME is defined but could not find Emulator file in $HOME\.android\avd” – alright.
These steps seem difficult, but if you follow it exactly, no problems should arise. We do not change system processes or something similar.
- Go to start
- search for ‘This PC’
- right click ‘This PC’
- Click ‘Properties’
![No JVM installation found](https://baswijdenes.com/wp-content/uploads/2016/01/search-this-pc-properties-190x300.png)
Search for ‘Advanced System Settings’ on the left side of ‘system’. Click it.
![No JVM installation found](https://baswijdenes.com/wp-content/uploads/2016/01/Advanced-system-properties-300x170.png)
The next window should be opened on the ‘Advanced’ tab. If not click ‘Advanced’ > ‘Environment Variables…’
![No JVM installation found](https://baswijdenes.com/wp-content/uploads/2016/01/system-properties-environment-variables-264x300.png)
Add a new ‘system variables‘.
![No JVM installation found](https://baswijdenes.com/wp-content/uploads/2016/01/environment-variables-new...-265x300.png)
Edit the System Variable:
- Variable name: ANDROID_SDK_HOME
- Variable value: Add the location where they actually are. Mine is in: C:\Users\wortell\OneDrive\.android\avd
It may be that your avd directory is somewhere other than mine. Find the right place.
The complete error message
Here is the complete error message for someone looking for another part of the error message.
In the error message you see that Android Studio tries to look at a location on Onedrive.
C:\Users\Wortell\OneDrive\AppData\Local\Android\Sdk\tools\emulator.exe -avd Nexus_5_API_22_x86 -netspeed full -netdelay none PANIC: HOME is defined but could not find Nexus_5_API_22_x86.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)
useful post thanks!