Unable to execute dex: multiple dex files define Landroid / support / v7 / appcompat

I get below exceptions when I try to run my project:

[2014-09-29 11:56:32 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v7/appcompat/R$anim; [2014-09-29 11:56:32 - PageViewers] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v7/appcompat/R$anim; 
+7
android
source share
2 answers

you have a library with two compatible

So, how I solved this problem:

  • Import the support library as a project from "SDK / Add-ons / Android / Support / v7 / AppCompat".
  • The reference library in your project (for Eclipse, "Properties - Android - Add").
  • Build projects (for Eclipse, "Projects - Build All"). Make sure you have "android.support.v7.appcompat" in your main project gen folder.
  • If this does not work, clean and rebuild the project.
+2
source share

I tried a lot, but finally solved it by doing

 cd android && ./gradlew clean 

refer to github issue .

0
source share

All Articles