Hi,
i am working on a project that depends on the androidannotations framework. In order to the annotation processor to run i have to declare a dependency in this way:
dependencies {
compile 'org.androidannotations:androidannotations:3.0-SNAPSHOT'
}
plus the needed repositories and the remaining android gradle plugin configuration.
With this dependency all the classes generated by the androidannotations annotation processor are created properly. But the problem comes when dx is run later on the build, when the following exception is produced:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lorg/androidannotations/api/BackgroundExecutor;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
The thing is that the androidannotations processor already generates a BackgroundExecutor class on my source folders, but then gradle passes the jar for the compile dependency on androidannotations too thus leading to the duplication.
Is it possible to use the dependency on 'org.androidannotations:androidannotations:3.0-SNAPSHOT' only on the compile phase and exclude it afterwards?
I have tried to use things like:
configurations {
apk.exclude module: 'org.androidannotations:androidannotations:3.0-SNAPSHOT'
}
based on the Gradle 1.6 user guide but it has no effect and the dependency is still always passed to dx leading to the duplication error.
Thanks,
Juan Ramon Gonzalez
--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.