最近搭建android開發環境遇到一個很是狗血的問題,在eclipse中導入svn中項目時,預編譯報錯,查看workspace 內的日誌文件,錯誤內容以下: java
java.lang.NullPointerException at com.android.ide.eclipse.adt.internal.build.SourceProcessor.scanFolderForSourceFiles(SourceProcessor.java:374) at com.android.ide.eclipse.adt.internal.build.SourceProcessor.scanFolderForSourceFiles(SourceProcessor.java:380) at com.android.ide.eclipse.adt.internal.build.SourceProcessor.buildSourceFileList(SourceProcessor.java:353) at com.android.ide.eclipse.adt.internal.build.SourceProcessor.<init>(SourceProcessor.java:97) at com.android.ide.eclipse.adt.internal.build.SourceProcessor.<init>(SourceProcessor.java:113) at com.android.ide.eclipse.adt.internal.build.AidlProcessor.<init>(AidlProcessor.java:85) at com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder.startupOnInitialize(PreCompilerBuilder.java:800) at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:542) at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:567) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:237) 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:54)
因此致使不可以自動生成資源代碼。 android
以前懷疑是64位JDK或者eclipse的問題換成32位後結果仍是報錯,最終將svn客戶端從1.6 升級到1.7後解決了這個問題。 估計是1.6的svn與ADT不兼容致使的。。。 eclipse