android - In Eclipse - Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/annotation/AnimRes; -


i can see same question has been asked many times, answers available couldn't find solution problem.

my project using 2 library projects & have included following jar files in libs.

- android-support-v4.jar

- aws-android-sdk-core-2.1.10.jar

- aws-android-sdk-s3-2.1.10.jar

- crashlytics.jar

- gson-2.3.1.jar

- library-1.0.15.jar (for volley)

- picasso-2.2.0.jar

while development, app running fine. moment tried export, creating signed apk file got error message.

"conversion dalvik format failed error 1"

in console, checked messages,

"jar mismatch! fix dependencies found 3 versions of android-support-v4.jar in dependency list, not versions identical."

in message checked 1 of android-support-v4.jar (from 1 of library projects) files different, replaced other jar file. jar files identical.

but when try run project getting 1 error message

"your project contains error(s), please fix them before running application."

now on checking console see following messages.

[2015-07-15 11:23:13 - dex loader] unable execute dex: multiple dex files define landroid/support/annotation/animres;

[2015-07-15 11:23:13 - myapp] conversion dalvik format failed: unable execute dex: multiple dex files define landroid/support/annotation/animres;

from answers, found issue because of multiple occurrences of same jar file getting added in project. included jar files 3rd party & necessary project.

i have tried of ways suggested in other answer, not able solve issue.

please me solve it.

finally managed solve it.the issue because of multiple occurrences of same set of classes or jar files. in libs folder, there 2 jar files

-gson-2.3.1.jar

-aws-android-sdk-core-2.1.10.jar

& both of these contain gson class. in aws in package com.amazonaws.com.google.gson.gson & in gson lib in com.google.gson.gson.

so because of getting error message multiple dex files define landroid/support/annotation/animres;.

now have removed -gson-2.3.1.jar file libs because it's feature, can use -aws-android-sdk-core-2.1.10.jar lib.

after cleaning project, able create signed apk file.


Comments