Community
Participate
Working Groups
Build Identifier: 20110615-0604 When starting Eclipse with the Android ADT plugin r12 installed I sometimes get the error "parseSdkContent failed". Apparently the attribute ProjectDescription for the function hasPublicChanges() in org.eclipse.core.internal.resources.ProjectDescription.java is null. According to the logged stacktrace: java.lang.NullPointerException at org.eclipse.core.internal.resources.ProjectDescription.hasPublicChanges(ProjectDescription.java:509) at org.eclipse.core.internal.resources.Project.setDescription(Project.java:1328) at org.eclipse.jdt.internal.core.ProjectReferenceChange$1.run(ProjectReferenceChange.java:107) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) at org.eclipse.jdt.internal.core.ProjectReferenceChange.updateProjectReferencesIfNecessary(ProjectReferenceChange.java:110) at org.eclipse.jdt.internal.core.ChangeClasspathOperation.classpathChanged(ChangeClasspathOperation.java:59) at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:110) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:793) at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:4925) at com.android.ide.eclipse.adt.internal.project.AndroidClasspathContainerInitializer.updateProjects(AndroidClasspathContainerInitializer.java:166) at com.android.ide.eclipse.adt.AdtPlugin$10.run(AdtPlugin.java:1291) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Reproducible: Always Steps to Reproduce: 1.Install Eclipse 2.Install Android ADT plugin r12 3.Create a project 4.After restarting Eclipse a couple of times this error could popup and never leave after once it popped up for the first time. The only way to resolve this is to reinstall Eclipse and hope for the best.
OK, I found out after a long search that the <name> tag got lost in the .project file of one of the projects. This probably happened when we moved and renamed the folder of our project on the subversion server. This name tag is required when creating a new project, but won't be checked for if the project got moved outside Eclipse? Isn't there a way that Eclipse will automatically validate these kind of files? Just like finding warnings/errors in code.
Moving to Platform/Resource
Adding a validator with errors/warnings is way too much. We just need to log it in the error log and maybe fall back to the empty string if the name is null.
I just log the problem and do not fall back to the empty string. Fixed with http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=8a988a6bc8c326a87b95eb8899561221b910deef