4

Just installed eclipse 3.6.2 JDK 1.6.0 update 24. And followed instructions on http://developer.android.com/sdk/installing.html

But eclipsed is failing with NPE. Also repros with eclipse 3.5.2

Any help would be very much appreciated.

Here is the log:

!SESSION 2011-03-16 23:23:42.967 -----------------------------------------------
eclipse.buildId=I20090611-1540
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.core.jobs 4 2 2011-03-16 23:23:48.989
!MESSAGE An internal error occurred during: "Initializing Java Tooling".
!STACK 0
java.lang.NullPointerException
    at com.android.sdklib.internal.project.ProjectProperties.parsePropertyFile(ProjectProperties.java:358)
    at com.android.sdklib.internal.project.ProjectProperties.load(ProjectProperties.java:246)
    at com.android.sdklib.internal.project.ProjectProperties.load(ProjectProperties.java:232)
    at com.android.ide.eclipse.adt.internal.sdk.Sdk.getProjectState(Sdk.java:376)
    at com.android.ide.eclipse.adt.internal.project.AndroidClasspathContainerInitializer.allocateAndroidContainer(AndroidClasspathContainerInitializer.java:196)
    at com.android.ide.eclipse.adt.internal.project.AndroidClasspathContainerInitializer.initialize(AndroidClasspathContainerInitializer.java:115)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2608)
    at org.eclipse.jdt.internal.core.JavaModelManager$11.run(JavaModelManager.java:2514)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2554)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1773)
    at org.eclipse.jdt.core.JavaCore.initializeAfterLoad(JavaCore.java:3410)
    at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:35)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY com.android.ide.eclipse.adt 4 0 2011-03-16 23:23:51.017
!MESSAGE Unknown exception in parseSdkContent.
!STACK 0
java.lang.NullPointerException
    at com.android.sdklib.internal.project.ProjectProperties.parsePropertyFile(ProjectProperties.java:358)
    at com.android.sdklib.internal.project.ProjectProperties.load(ProjectProperties.java:246)
    at com.android.sdklib.internal.project.ProjectProperties.load(ProjectProperties.java:232)
    at com.android.ide.eclipse.adt.internal.sdk.Sdk.getProjectState(Sdk.java:376)
    at com.android.ide.eclipse.adt.internal.sdk.Sdk$1.onProjectOpened(Sdk.java:841)
    at com.android.ide.eclipse.adt.internal.sdk.Sdk$1.projectOpenedWithWorkspace(Sdk.java:828)
    at com.android.ide.eclipse.adt.internal.resources.manager.GlobalProjectMonitor.addProjectListener(GlobalProjectMonitor.java:368)
    at com.android.ide.eclipse.adt.internal.sdk.Sdk.<init>(Sdk.java:632)
    at com.android.ide.eclipse.adt.internal.sdk.Sdk.loadSdk(Sdk.java:252)
    at com.android.ide.eclipse.adt.AdtPlugin$10.run(AdtPlugin.java:1234)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Kim
  • 71
  • 1
  • 3
  • Not sure why this was closed as too localized--many people have reported the same problem: http://stackoverflow.com/questions/10140732/error-with-parsing-android-sdk-content-and-initializing-java-tooling-in-eclipse/10449082#10449082, http://stackoverflow.com/questions/5019051/problem-with-android-sdk-content-loader – Jeff Axelrod May 04 '12 at 12:56
  • For me, the source of the `NullPointerException` problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a `project.properties` file. It's not an Android project, but for some reason the newer versions of the SDK somehow expects the file there. To fix the problem, I just copied a `project.properties` file from an Android project to the host unit test project. – Jeff Axelrod May 08 '12 at 15:17

1 Answers1

1

Resolved!

Uff, I had projects in older eclipse installation which I think were throwing error with new installation.

Learning: Switch to new the workspace with new eclipse install.

Kim
  • 71
  • 1
  • 3
  • 3
    Alternatively, you may delete (back it up beforehand) the .metadata directory in your workspace. – Jon Willis Apr 15 '12 at 00:06
  • I switched to a new workspace using -data switch in command line but that didn't help. Deleting .metadata as Kim suggested did the trick for me. – pm_labs Aug 04 '12 at 13:28