i know there might be a lot of resources out there about this but non of them seem to solve my problem directly, so here i go'
I was of the opinion that android libraries are standalone entities and so the contents of one library should not affect the operations of another. That's why we've got namespacing and package naming but boy am i so wrong.
I have two aar files i have imported to my android project. The aar files namely A and B are in my libs folder and are added to gradle as such
compile (name: 'A', ext: 'aar);
compile (name: 'B', ext: 'aar);
All was dandy until i tried to build my project, then it all went to hell.
Library A has a structure
android.fpi
MtGpio.class
So Does Library B
android.fpi
MtGpio.class
Ideally, they are totally different libraries and if they happen to have similar files or structure, that shouldn't be a problem right. But it is, i get hit with:
app:transformClassesWithJarMergingForDebug
com.................................ZipException: duplicate entry: android/fpi/MtGpio.class
i have resorted to all sorts of solution's i've read up on SO but here i am, still looking for a solution that works.
What have i tried?
MultiDexEnable true;
Whilst adding the second aar library to the grable file, i tried to exclude the class as below but i still get the same error.
compile (name: 'B', ext: 'aar'){ exclude group: 'com.android.fpi', module: 'MtGpio' }
Several other solutions that mostly have to do with support-v4 yada yada
Now i'm turning to the android virtuosos out here for help. Thanks in advance.