Alex Rivera | Logout

Android SDK Content Loader failing with NullPointerException

Asked 2011-02-16T16:23:43.573
34

I've just recently started getting an error any time I interact with the Android SDK and AVD Manager in Eclipse Helios

I've tried reinstalling the Eclipse plugin and the Android SDK but to no avail.

If I go to the "Installed packages" page and click refresh (or install or remove a package) I get a popup box saying that

'Android SDK Content Loader' has encountered a problem. 
parseSdkContent failed 
java.lang.NullPointerException.

Here is the full log:

Stack Trace

java.lang.NullPointerException
   at com.android.ide.eclipse.adt.internal.sdk.Sdk.loadTarget(Unknown Source)
   at com.android.ide.eclipse.adt.AdtPlugin$10.run(Unknown Source)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Session Data

eclipse.buildId=M20100909-0800
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_IE
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product

Has anyone else encountered this recently? It doesn't seem to be affecting actual Android development but its just kinda annoying.

Edit
Report

4 Answers

39

The issue is in the your-avd-name.ini that is located at ...\<user-profile>\.android on your Windows machine (if you're Windows user). When any error occurs during the avd.ini parser, the Google ADT plugin tries to access a map that is null. The workaround is to delete the offending .ini file and recreate your avd(s).

This information was posted here: http://community.developer.motorola.com/t5/MOTODEV-Studio-for-Android/Android-SDK-Content-Loader-has-encountered-a-problem/td-p/6565

answered 2011-05-24T15:18:28.863
1

For some reasons my sdk/addons and sdk/platforms directories got corrupted and unreadable (computer crash), this caused my "'Android SDK Content Loader' has encountered a problem." error.

Had to delete/rename the entire sdk folder, download and install the sdk+packages again. In user/.android everything was fine.

answered 2012-03-31T09:59:25.777
1

First start the emulator from command line

emulator -avd yourDeviceName

after doing above step in my case eclipse started fine.

UPDATE:

There is no perfect solution to this problem other than starting all over again. The issue is still open.

answered 2012-08-22T12:54:52.900
1

I'm on Windows 7; I got this error on first startup of ADT-provided Eclipse. My particular variant referenced an inability to write to a location on my C: drive. I solved it using the .metadata trick from above; then I chose "Run as Administrator" and everything worked fine after that.

answered 2013-03-15T22:20:40.950

Your Answer