Home » Android » cordova – Android – Unable to execute dex: Multiple dex files define

cordova – Android – Unable to execute dex: Multiple dex files define

Posted by: admin June 15, 2020 Leave a comment

Questions:

I tried run my android app and i 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’m using this project for my reference.
http://devgirl.org/2012/10/25/tutorial-android-push-notifications-with-phonegap/

I’m using phone gap for my project. I export external cordova lib project into my android project.

Why it happen?

How to&Answers:

You can also remove this error by following these steps:

  1. Go to ‘Build Path..’ then Click on ‘Configure Build Path..’
  2. Go to Order & Export tab. Unmark ‘Android Private Libraries’ & Click ‘OK’.

Answer:

I found the answer

I remove cordova-2.1.0.jar in build path.

enter image description here

Then I remove cordova-2.1.0.jar from libs folder.

enter image description here