当我为不同的 buildTypes 使用不同的清单时,我似乎遇到了 Android Annotations 查找我的 Android Manifest 的问题。我得到的错误是:
java: error: Unexpected error. Please report an issue on AndroidAnnotations, with the following content: java.lang.IllegalStateException: Could not find the AndroidManifest.xml file, going up from path [/Users/jabdulius/Documents/Dropbox/workspace/<app-name>/aa-gen] found using dummy file [file:///Users/jabdulius/Documents/Dropbox/workspace/<app-name>/aa-gen/dummy1379349979895.java] (max atempts: 10)
at com.googlecode.androidannotations.helper.AndroidManifestFinder.findManifestInParentsDirectories(AndroidManifestFinder.java:156)
at com.googlecode.androidannotations.helper.AndroidManifestFinder.findManifestFileThrowing(AndroidManifestFinder.java:93)
at com.googlecode.androidannotations.helper.AndroidManifestFinder.extractAndroidManifestThrowing(AndroidManifestFinder.java:65)
at com.googlecode.androidannotations.helper.AndroidManifestFinder.extractAndroidManifest(AndroidManifestFinder.java:55)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.extractAndroidManifest(AndroidAnnotationProcessor.java:388)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.processThrowing(AndroidAnnotationProcessor.java:358)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.process(AndroidAnnotationProcessor.java:341)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:627)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:556)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:701)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:987)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:115)
at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:167)
at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:375)
at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:278)
at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:190)
at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:162)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1070)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:798)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:829)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:761)
at org.jetbrains.jps.incremental.IncProjectBuilder.access$800(IncProjectBuilder.java:78)
at org.jetbrains.jps.incremental.IncProjectBuilder$BuildParallelizer$2.run(IncProjectBuilder.java:730)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:35)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
在 Project Settings->Compiles->Annotation Processors 中,我尝试将标志 ("AndroidManifestFile") 设置到我的清单 ("/src/main/AndroidManifest.xml") 的位置,但这并没有什么不同。
这是我的导演结构的样子:
还有我的注释处理器设置:
有任何想法吗?