You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Hi I'm using Android Annotations V 3.0 Snapshot,
I have two projects Project A is a library project, Project B is the main project and has an dependency on Project A.
I'm getting following error when I use @ Background annotation in both projects.
Unable to execute dex: Multiple dex files define Lorg/androidannotations/api/BackgroundExecutor$Task;
I think the reason is both projects generate org.androidannotations.api.BackgroundExecutor class.
Yeah, you're right. Both project generate org.androidannotations.api.BackgroundExecutor and Android dex compilation doesn't support duplicated classes.
We could remove BackgroundExecutor from generating phase (like I already did for all Prefs annotations), but I'm not sure it's the best solution as it'll almost totally revert the feature introduced by @mathieuboniface to shrink down the apk size.
Isn't it possible to generate API classes just in final project? Or give some option to revert to previous way
I have more or less half of the app in library project (as there are few apps that share big portion of functionality), so the proposed solution is really far from desirable ;).
Agree with @AntekM temporarily I had to use Async Tasks.
But AA Version 3 is out and as I read this is fixed on AA V3, Haven't testted, Just check release notes, #848 the related issue.
It's worth noting that if someone is using gradle, Android Annotations-API cannot be used again as a dependency in final project (should be used just in library project)
Activity
DayS commentedon Oct 2, 2013
Yeah, you're right. Both project generate
org.androidannotations.api.BackgroundExecutorand Android dex compilation doesn't support duplicated classes.We could remove
BackgroundExecutorfrom generating phase (like I already did for allPrefsannotations), but I'm not sure it's the best solution as it'll almost totally revert the feature introduced by @mathieuboniface to shrink down the apk size.yasitha999 commentedon Oct 3, 2013
Thanks, I'm little-bit new to code generation strategies, any quick fix for this issue? any configuration or something ?
DayS commentedon Oct 4, 2013
Right now, the easiest way right now is to only use
@Backgroundor@UIThreadin your library OR your final project, not both.AntekM commentedon Jan 16, 2014
Isn't it possible to generate API classes just in final project? Or give some option to revert to previous way
I have more or less half of the app in library project (as there are few apps that share big portion of functionality), so the proposed solution is really far from desirable ;).
yasitha999 commentedon Jan 16, 2014
Agree with @AntekM temporarily I had to use Async Tasks.
But AA Version 3 is out and as I read this is fixed on AA V3, Haven't testted, Just check release notes, #848 the related issue.
AntekM commentedon Jan 16, 2014
Ok, thanks - I didn't notice that 3.0.1 is out. This version indeed fixes this problem.
DayS commentedon Jan 16, 2014
Great :)
I can close this issue then
AntekM commentedon Jan 16, 2014
It's worth noting that if someone is using gradle, Android Annotations-API cannot be used again as a dependency in final project (should be used just in library project)