Reputation: 81
I am using Android Annotations framework in a library project and it does not compile.
If I remove the code which uses Android Annotations, my project with the library works fine.
When I add any annotation it gives me the error
Error:Could not find the AndroidManifest.xml file, using generation folder [project_path/build/generated/source/apt/release])
Error:Execution failed for task ':libraryname:compileReleaseJavaWithJavac'.
Compilation failed; see the compiler error output for details.
I am using Android Studio 2.3, so I am not using android-apt plugin, instead, I have enabled Annotation Processor from Android Studio settings.
I have also added the annotationProcessorOptions to my library build.gradle file as instructed.
javaCompileOptions {
annotationProcessorOptions {
arguments = ["library": "true",
"resourcePackageName":"com.android.libraryname"]
}
}
Also my dependencies looks like this regarding Android Annotations
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile 'org.androidannotations:rest-spring-api:4.1.0'
annotationProcessor "org.androidannotations:androidannotations:$AAVersion
annotationProcessor 'org.androidannotations:rest-spring:4.1.0'
Library is normally working fine, and Android Annotations in the client project is also working fine, the problem is caused when I try to use Android Annotations in a library project with Android Studio version 2.3
Is there any way to solve this, I've tried everything I could find but did not work.
Upvotes: 1
Views: 1543
Reputation: 12207
This is indeed a bug which is already fixed. https://github.com/androidannotations/androidannotations/pull/1975
A new version will be released shortly, until then, you can use the 4.3.0-SNAPSHOT version. https://github.com/androidannotations/androidannotations/wiki/Building-Project-Gradle#snapshots
Upvotes: 1