Android - cannot execute dex: multiple dex files define

I tried to run the Android application and got this error.

[2014-03-11 11:21:34 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/apache/cordova/App$1; [2014-03-11 11:21:34 - Android-C2DM-PhoneGap] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/apache/cordova/App$1; 

I am using this project for reference. http://devgirl.org/2012/10/25/tutorial-android-push-notifications-with-phonegap/

I use phone space for my project. I am exporting an external cordova lib project to my android project.

Why is this happening?

+8
android cordova
source share
2 answers

I found the answer

I am removing cordova-2.1.0.jar in the build path.

enter image description here

Then I delete cordova-2.1.0.jar from the libs folder.

enter image description here

+6
source share

You can also remove this error by following these steps:

  • Scroll to "Build Path ...", then click "Configure Build Path."
  • Click on the Order and Export tab. Disable Android Private Libraries and click OK.
+12
source share

All Articles