7

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.

5 Answers 5

18

Just have one copy of the GCM JAR in libs/. Do not mess with your build path manually.

Sign up to request clarification or add additional context in comments.

4 Comments

I removed the GCM from the built path and from /libs and I re-added it again.
@MattiasteWierik: Then compare your project configuration with the one I linked to in the answer and try to determine where the extra copies of the GCM JAR are coming from.
Okay, thanks for the post. Will give more information in some hours.
Thanks for the help. Found the solution. For some kind of reason it worked now and still don't know what I did wrong. Thanks for you help! :)
2

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.

1 Comment

I had the same problem with Drive API. Unticking it in Order and export did the trick.
1

I unchecked google-play-services.jat in the "order and export" part of the "configure build path" and then in worked.

Comments

0

Instead of adding GCM.jar from your project, add as a external jar.

Comments

0

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.