JakeWharton / ThreeTenABP

An adaptation of the JSR-310 backport for Android.
Apache License 2.0
3.55k stars 133 forks source link

Cannot Run Project on Android Phone Even After Compiling Due to "unable to merge dex" Error #60

Open agarwalmayank32 opened 7 years ago

agarwalmayank32 commented 7 years ago

I am currently using the Android Studio 3.0 and I have faced this problem of compiling this project with ApexNLP library and I am facing this error. I tried the library in the previous version of the android studio but it still failed. I need the ApexNLP library for the project. So please help me out.

ApexNLP Project Link : https://github.com/6thsolution/ApexNLP

Error: Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

JakeWharton commented 7 years ago

It's not clear why you think this project is causing the problem.

agarwalmayank32 commented 7 years ago

I think that this library is creating the problem because if I don't add it then the whole app is running fine. But it has been told in the ApexNLP library to use your library for android.

On 07-Nov-2017 1:21 AM, "Jake Wharton" notifications@github.com wrote:

It's not clear why you think this project is causing the problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JakeWharton/ThreeTenABP/issues/60#issuecomment-342265729, or mute the thread https://github.com/notifications/unsubscribe-auth/AMtPrv3Qxk5ldY91aBBAVcY5o5M8JC1vks5sz2NBgaJpZM4QTg6q .

JakeWharton commented 7 years ago

I can't reproduce. Can you supply an example project that demonstrates the failure?

magneticflux- commented 7 years ago

@JakeWharton I ran into this same issue, albeit a different way. It's caused by including threetenbp-1.3.6 and threetenbp-1.3.6-no-tzdb dependencies in the same project. The ABP version of ThreeTen requires the no-tzdb classifier, but I'm using another library (iCal4j) that depends on the unclassified version. Thus, both versions are included and there are duplicate files. You also might want to update the ThreeTenBP dependency to 1.3.6 since you currently have it on 1.3.3.

@agarwalmayank32 I solved the issue by writing the iCal4j dependency as this:

implementation 'org.mnode.ical4j:ical4j:2.1.4', {
    exclude group: 'org.threeten'
}