Android SDK and AVD Manager -Cant create AVD in correct file location

前端 未结 5 2104
一生所求
一生所求 2020-12-09 06:02

When trying to create an AVD with the android SDK AVD manager I get \'Error: null\'. This keeps happening because the SDK manager is looking for \'List of existing Android V

相关标签:
5条回答
  • 2020-12-09 06:42

    I had similar issue. I have solved this by setting up the environment variable ANDROID_SDK_HOME in my startup script. The path shall be your desired location of .android folder, excluding the last slash. Example:

    SET ANDROID_SDK_HOME=C:\Users\toybuilder\Downloads
    
    0 讨论(0)
  • 2020-12-09 06:43

    I have a Solution for this error:

    • Right click Folder "C:\User\yournamecomputer.android" and uncheck Read-Only

    it work for me :D

    0 讨论(0)
  • 2020-12-09 06:45

    I had the same problem this weekend. In my case, I was able to create the AVD's, but not able to start them.

    The problem was caused by the AVD Manager creating the AVD's in a different directory from where the emulator was trying to launch the AVD's.

    In my case, AVD Manager was initially reporting the list of existing Android Virtual Device located at C:\Users\toybuilder\Downloads\.android\avd

    It turns out that my Java runtime (in this case, JDK 1.6u24) was reporting C:\Users\toybuilder\Downloads as my home directory (user.home property). I first confirmed this via Eclipse:

    In Eclipse, go to:

    Eclipse Menu: Help -> About Eclipse Click on the [Installation Details] Click on the [Configuration] tab: The text box fills with an extended dump of the Eclipse environment . Look for the user.home value. In my case, the line read: user.home=C:\Users\toybuilder\Downloads

    It turns out that there's a long-standing Java bug (nearly 9 years old) on how the Java runtime determine's the user.home property - as discussed elsewhere on StackOverflow

    In my particular case, the buggy behavior was triggered by a bad windows folders redirection. I had apparently moved my Desktop folder into my Downloads directory at some point by accident. Although I had fixed the problem, it nevertheless left an entry in my registry with a Desktop folder redirection to the Downloads directory. There was a HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop registry key that pointed, incorrectly, to C:\Users\toybuilder\Downloads\Desktop

    The Java runtime was apparently setting user.home as "Desktop"/.. (i.e., the Downloads directory), while some other mechanisms were resolving the home directory at the correct location (probably the Windows %userprofile% environmental value) -- and hence when the emulator was starting up, it could not find the .android/avd directory, because it was looking from a different starting directory.

    After I deleted the incorrect redirection registry key, the problem went away.

    0 讨论(0)
  • 2020-12-09 06:45

    Windows with "folder redirection" have this issue. If you are logged in a domain and the admin has set a redirection for your home folders eclipse/android SDK cannot read correctly some files. You can try the following steps:

    1. Close Eclipse

    2. Just set a user environmental variable like: Variable Name:ANDROID_SDK_HOME Variable Value:C:\Users\{your login}

    3. Copy the .android folder from the "redirection" folder to C:\Users\{your login}

    4. Start Eclipse.

    Now the AVDs should work fine.

    0 讨论(0)
  • 2020-12-09 06:50
    SET ANDROID_SDK_HOME variable not working for me.
    
    1. Open eclipse
    2. Click on window menu and then select preference.
    3. Select android from left hand side.
    4. Now SET SDK location e.g. E:\android\sdk instead of ../sdk means set Absolute path instead of Relative path.

    Its worked for me.

    I hope this help someone and save time.

    0 讨论(0)
提交回复
热议问题