Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
474 views
in Technique[技术] by (71.8m points)

eclipse - Android Pre Compiler error on 21.0.1 android sdk

I check out the old android project on a different pc and I get a Android Pre Compiler Null pointer exception error, on every save so R.java can't be generated. The project is a library project using other library to.

The new where the project is not working is system is: 64 bit ubuntu, ADT eclipse, Android sdk tools 21.0.1, Android sdk platform-tools 16 the error is:

!ENTRY org.eclipse.core.resources 4 2 2013-01-07 02:07:15.177 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". !STACK 0 java.lang.NullPointerException at com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.build(PreCompilerBuilder.java:673) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

!ENTRY org.eclipse.core.resources 4 75 2013-01-07 02:07:15.717 !MESSAGE Errors occurred during the build. !SUBENTRY 1 com.android.ide.eclipse.adt 4 75 2013-01-07 02:07:15.717 !MESSAGE Errors running builder 'Android Pre Compiler' on project 'MyProject'. !STACK 0 java.lang.NullPointerException at com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.build(PreCompilerBuilder.java:673) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

The project works on a old system:

The old system is: 32 bit ubuntu, 4.2.1 eclipse Juno, Android sdk tools 21,

Git is used as a version control system. It is a very strange problem I have checkt all of the xml run them with lint to find a xml build problem but no luck on every save the i have the same error and the R.java is not generated. Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The Android Pre Compiler in 21.0.1 appears to be badly broken, crashing on .svn directories and .DS_Store files, and files without file extensions.

The solution that worked for me was to upgrade to 21.1 rc1 following these steps:
1. Follow instructions here: http://tools.android.com/preview-channel
2. Make sure to update both SDK Manager and ADT
3. Restart Eclipse

See this bug for more information: http://code.google.com/p/android/issues/detail?id=42051


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...