Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the path to android\avd in my Android Studio

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?

like image 754
Ron D Avatar asked Nov 09 '16 06:11

Ron D


People also ask

How do I change the location of my emulator?

First, run your Android Emulator and click on the three dots on the menus beside. On the left pane, select Location and change the coordinates according to your location. Press the Send button, changes will immediately take effect.

Where are Android AVD stored?

Note: The default storage location for AVDs is in ~/. android/avd on OS X and Linux, C:\Documents and Settings\<user>\. android\ on Windows XP, and C:\Users\<user>\. android\ on Windows Vista.


2 Answers

  1. Open control panel
  2. Then go to System
  3. Then go to Change Environment Variables of the User
  4. Then click create a new environment variables
  5. Create a new variable named ANDROID_SDK_HOME
  6. Set its value to your Android directory, like C:/users/<username>/.android
like image 133
keipa Avatar answered Sep 23 '22 09:09

keipa


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:

  1. Open Control Panel
  2. Then go to System and Security
  3. Then go to System
  4. Then go to Advanced system settings
  5. Then go to Change Environment Variables of the User
  6. Then click create a new environment variables
  7. Create a new variable named ANDROID_AVD_HOME
  8. Set its value to your Android directory, like C:/users/<username>/.android
like image 30
Javier Avatar answered Sep 24 '22 09:09

Javier