开发者

Android SDK AVD Error:null

开发者 https://www.devze.com 2023-03-09 12:23 出处:网络
When I try installing the Android SDK onto eclipse, I can not create a new virtual device. I keep getting this error [2011-05-28 12:05:16 - SDK Manager] Error: null. Is there any way I can fix this

When I try installing the Android SDK onto eclipse, I can not create a new virtual device. I keep getting this error [2011-05-28 12:05:16 - SDK Manager] Error: null. Is there any way I can fix this

How I Fixed This Problem deleted all the files in my workspace. Reset an开发者_如何学Cd it started working.


same issue here on MAC OS X. Here is my configuration.

bigboy:platform-tools kaffein$ uname -a
Darwin bigboy.home 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64

The Why

It is a problem with the permission settings of your ~/.android/avd folder. Since virtual device emulator settings and configurations are written in this folder, the SDK tools (avd manager in this case) has to be able to write in this directory.

The how

First, check your ~/.android/avd permissions using the ls Unix command (cd to your home directory) :

bigboy:~ kaffein$ ls -al .android/
drwxr-xr-x   5 kaffein  staff   170 Jan  5 14:35 .
drwxr-xr-x+ 53 kaffein  staff  1802 Jan  5 21:22 ..
-rw-r--r--   1 root        staff   123 Jan  5 14:08 adb_usb.ini
-rw-r--r--   1 root        staff   131 Jan  5 14:35 androidwin.cfg
drwxr-xr-x   2 root        staff    68 Jan  5 12:48 avd

the avd folder belongs to root. You can begin by changing the owner of this folder to yourself using the following command.

bigboy:~ kaffein$ cd .android/
bigboy:.android kaffein$ sudo chown kaffein:staff *

check again to see that you are now the owner of the folder using the following command :

bigboy:.android kaffein$ ls -al
total 16
drwxr-xr-x   5 kaffein  staff   170 Jan  5 14:35 .
drwxr-xr-x+ 53 kaffein  staff  1802 Jan  5 21:22 ..
-rw-r--r--   1 kaffein  staff   123 Jan  5 14:08 adb_usb.ini
-rw-r--r--   1 kaffein  staff   131 Jan  5 14:35 androidwin.cfg
drwxr-xr-x   2 kaffein  staff    68 Jan  5 12:48 avd

you should have an output like the one above (of course, kaffein should be your username)

Finally, you should change the permission settings on the avd/ folder using the following command :

bigboy:.android kaffein$ sudo chmod a+rw avd/

check that you actually changed the settings with ls -al command.

bigboy:.android kaffein$ ls -al
total 16
drwxr-xr-x   5 kaffein  staff   170 Jan  5 14:35 .
drwxr-xr-x+ 53 kaffein  staff  1802 Jan  5 21:22 ..
-rw-r--r--   1 kaffein  staff   123 Jan  5 14:08 adb_usb.ini
-rw-r--r--   1 kaffein  staff   131 Jan  5 14:35 androidwin.cfg
drwxrwxrwx   2 kaffein  staff    68 Jan  5 12:48 avd

avd is now set to 777.

Final step

From your Eclipse IDE, open the AVD manager and try to create a virtual device. Taaadaaaa!!!! Everything should work...

I hope it helped ...


Just for sharing purpose, I got the error of [2011-10-20 10:07:17 - SDK Manager] Error: null and I resolved the problem by setting up the environment variable ANDROID_SDK_HOME over Control Panel.

Start -> Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables -> New

Variable Name: ANDROID_SDK_HOME Variable Value: (the path is be your desired location of .android folder, excluding the last slash) For Example: C:\Users\myUsername

Cheers!


I had the same problem just now.

Starting the android tool and trying to add a AVD gave me a "Permission Denied" error on my ~/.android folder (Mac OS X here).

I bet it's too much but this solved the problem for me:

  • Exit the android tool or the Eclipse AVD Manager;
  • Remove the .android directory;
  • Start the android tool again and try adding AVDs.

Voilà. With this I was able to add new AVDs both via the tool (when started directly) and Eclipse.

I'm pretty sure I messed up the permissions in some way, and that the most correct solution to this problem is to fix the permissions of this directory.


Nothing suggested in here worked for me, I was still getting the error on my CentOS 7 server.

After some more digging I find out that the issue was related to the creation of the SDCard:

$ avdmanager -v create avd --force --name avd_5568 --package 'system-images;android-25;google_apis;x86' --sdcard 256M --abi google_apis/x86 --device "4in WVGA (Nexus S)"
Warning: Failed to create the SD card.
Warning: Failed to create sdcard in the AVD folder.
Error: AVD not created.
null

And after some more googling i figured out that I had to install some required dependency.

Required libraries for 64-bit GNU/Linux machines:
If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386

If you are running 64-bit Fedora, the command is:

sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686


If your still having this problem, I found a solution (on Windows 7). My console was giving me the exact same error and Eclipse said that my android sdk was not in the right location - even though it was - whenever I opened eclipse.

To fix this, right click on your android-sdk folder, go to properties, security, then under the "Group or user names" list, make sure each one (especially "trusted installer") has full permissions for the file - make sure all the "allow" boxes are checked. Next time you start up the SDK Manager, you should be able to download everything with no problem.


I also encountered this problem on Linux, I found it was the permission issue,I solved the problem by adding the writing permission to the eclipse user, you can also solve this by change the owner of the file to the eclipse user, hope you will benefit from this.


Not sure if this is your problem but I've seen this happen when the SDK Manager is looking in the wrong directory for Android Virtual Devices. I would double check this and make sure it's correct, you'll see it at the top of the Android SDK and AVD Manager window.


i think your problem is you cant create virtul device right?

The easiest way to create an AVD is to use the graphical AVD Manager, which you launch from Eclipse by clicking Window > Android SDK and AVD Manager.
OR
You can also start the AVD Manager from the command line by calling the android tool in the tools directory of the Android SDK.for commands guide/developing/tools/emulator.html then you should see this video
and then -android-emulator-managing-android-virtual-devices-avd


Did you solve your issue? I had a similar issue on my mac but I solved it last night. I had not write acces to my disk with my user account which made it impossible to start a virtual machine. So I changed my permission to read/write which solved the issue.


I got same problem. I downloaded the SDK package (for windows 64bits) from the android developer website, when I created AVD, I got an error: "[2013-03-14 ... SDK manager ] error: null".

Run Eclipse.exe as administrator, then it works, I can create an AVD.


I had the same problem. Check the steps:

  1. Sdk manager it self might be corrupted , as a good practice its advisable to keep a back up and use the same to check whether there is problem with SDK manager

  2. Delete .android/avd from user/profile

  3. Delete .metadata from your work place .make sure you take the back up.

  4. change the work place

  5. check the privileges of .android you should have read write option if not then please give read write option


The fastest way I found: Ubuntu 12.04 1. Goto you home folder 2. Ctrl + H (show hidden file & folders) 3. Right click -> Open in Terminal

 // shows ownership for the android hidden folder
your-machine:~$ ls -l .android/
// change ownership to you
your-machine:~$ sudo chown yourUserName.yourUserName -R .android/

& try creating a new AVD


In case you cannot create an AVD device:

  1. Check your .android folder and crosscheck if you have all the files that are supposed to be in there (adbkey,androidtool.cfg,ddms.cfg,debug.keystore,default.keyset). Make sure the adbkey.pub and the debug.keystore exist.
  2. Go to your eclipse and run as admin OR
  3. Go to your SDK folder and right click. >> go to properties >> security
  4. Now click on each user category in the list of group name lists and click edit.
  5. Make sure all of them have absolute permission or rather full control. (all boxes should be checked)
  6. Now go back to sdkmanager.exe and right click >> properties >> security and repeat from 5.


This happened to me when I updated a few weeks ago.

Try this in Eclipse:

For Mac OS X

Window > Customize Perspective... (you will see Android and AVD Manager are disabled)

now click on "Command Groups Availability" tab > Android and AVD Manager > check

Tool Bar Visibility > Android and AVD Manager > check

Now you can see AVD Manager Item on Eclipse toolbar.

cheers!!


I have one solution for who, can not create avd after changed .android\ file to another drive, No need to any permission.

follow steps: after move .android file to another drive folder for example

1 : go to your sdk -> tools folder

2 : Now Double click on android.bat file -- sdk manager will start

3 : Now go to Tools tab and selecet Manage AVD -- now avd manager will start

4 : Now create avd -- avd will create in your specific path folder.

5 : Now restart your eclipse if not started or start eclipse ,

Now you can create avd in specified drive folder.

0

精彩评论

暂无评论...
验证码 换一张
取 消