I have such exaption
InvalidPathException: Illegal char at index 9: C:\Users\??????\.android\avd\1.avd (show balloon)
when trying to create emulator. Can I change the location of directory .android?
I have such exaption
InvalidPathException: Illegal char at index 9: C:\Users\??????\.android\avd\1.avd (show balloon)
when trying to create emulator. Can I change the location of directory .android?
C:/users/<username>/.android
I tried suggested solution but did not work for me. In my case I have to add a different variable so steps for me were:
C:/users/<username>/.android
How can I change the path to android\avd in my Android Studio ?
Let say you want to move avd directory from it's default C:\users\<username>\.android\avd
to D:\Development\avd
D:\Development\avd
)ANDROID_AVD_HOME
: D:\Development\avd
New...
and fill with aforementioned data.Edit...
and replace variable value with the new path (ex. D:\Development\avd
)
D:\Development\avd\avdName
(ex. D:\Development\avd\Nexus_S_API_22.avd
)There is a simple way to move avd(in windows):
open the directory: C:\Users\Username\.android\avd
, you will find the directory named with your AVD and a .ini file
move the directory to your desirable path, then change the path variable in the .ini file to the new location.
start the Android studio, you will find that the AVD can work properly.
Just move the emulator folder(folder that ends with .avd) to new location and keep the .ini file in same location then change the path to new location in .ini file.
No environment variable needed to be changed or added.
old path path=C:\Users\nero\.android\avd\Android_Q.avd
new path path=D:\androidemuators\avd\Android_Q.avd
You can keep your emulator anywhere just need to tell .ini config file where your emulator is located.
Simple with Image solution here, no need to edit Environment Variables here.
C:\Users\<PCname>\.android
and move the avd folder
to
your desired location. Example D:\Programming\Android Studio\avd
avd folder
and edit every .ini files, each one of these is represent to your emulator.These are .ini files:
Old path:
New path:
Here is an updated solution worked for me in 2024.
Accroding to this doc, Androdi Studio locates avd
dictionary through an environment variable called ANDROID_AVD_HOME
.
The default value of ANDROID_AVD_HOME
is $ANDROID_EMULATOR_HOME/avd/
, where $ANDROID_EMULATOR_HOME
is $HOME/.android/
.
Find your avd
dictionary.
Move avd
dictionary to a new place, suppose to be D:\avd
.
There are many .ini files in the avd
dictionary. Open these files, edit path in these files.
(see the answer under this question from DL Studio for your reference)
Create a new environment variable named ANDROID_AVD_HOME
.
Set its value to D:\avd
.
Had the same problem. The reason was that ANDROID_AVD_HOME pointed to my user directory which had a space and umlaut in it. Obviously that causes some trouble with Android Studio. So defining a system wide ANDROID_AVD_HOME point to d:\development\avd\ solved the problem.
© 2022 - 2024 — McMap. All rights reserved.