Gradle + Android Annotations + Merged Manifest = "Could not find the AndroidManifest"
Asked Answered
M

0

3

I seem to be running into a problem with Android Annotations finding my Android Manifest when I'm using different manifests for different buildTypes. The error I get is:

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)

In Project Settings->Compiles->Annotation Processors, I tried setting a flag ("AndroidManifestFile") to the location of my manifest ("/src/main/AndroidManifest.xml"), but it didn't make a difference.

Here's what my director structure looks like: enter image description here

And my Annotation Processor settings: enter image description here

Any ideas?

Metallize answered 16/9, 2013 at 17:11 Comment(1)
Have you checked this answer on how to run AndroidAnnotations with gradle? https://mcmap.net/q/507723/-android-studio-gradle-android-annotations-closedPredictor

© 2022 - 2024 — McMap. All rights reserved.