Reputation: 143
I'm busy for a school assignment to create a timetable app which fetches data from my database by JSON.
I use the GCM service for push notifications and Johan Nilsson's Android Actionbar.
However, when I try to export my application to an .APK file the following errors occur.
[2012-12-10 10:28:03 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/google/android/gcm/GCMBaseIntentService;
[2012-12-10 10:28:03 - TimeTable] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/google/android/gcm/GCMBaseIntentService;
While exporting an Android Dependencies map is created and creating a duplicate. Inside there is a reference to GCM and the android actionbar. While the GCM is already in the referenced libraries map after adding the gcm to the build path from the libs folder.
So after deleting the dependencies I can't run and export the application, because of the errors.
I already tried cleaning and rebuilding the app. Please help me.
Upvotes: 7
Views: 23531
Reputation: 1007474
Just have one copy of the GCM JAR in libs/
. Do not mess with your build path manually.
Upvotes: 18
Reputation: 364
In my case i just directly copied my jar files to eclipse project libs folder with capital letters. just renamed to small case. my problem got solved
Upvotes: 0
Reputation: 151
Instead of adding GCM.jar from your project, add as a external jar.
Upvotes: 0
Reputation: 499
I unchecked google-play-services.jat in the "order and export" part of the "configure build path" and then in worked.
Upvotes: 1
Reputation: 2422
Untick the admob jar file in the "order and export" part of the "configure build path".
It worked for me right away...
I tired every thing like deleting Bin directory or deleting gen directory, restarting Eclipse or cleaning and building again but nothing worked except for above step.
Upvotes: 2