Reputation: 79
I've been searching around and there are quite a few posts relating to this issue, but there doesn't seem to be a definitive solution (eg Error when building apk - "Multiple dex files define Lcom/google/ads/Ad")
I've tried cleaning/updating/restarting eclipse - all of the things mentioned in other posts.
My project builds and I can run it on a device. But when I try and export a signed apk I get the error.
I don't get the error with other projects - all of which worked before updating adt etc but for some reason a particular project won't export...
As I say I can build the project in eclipse and run/debug it - I just can't export it.
Upvotes: 4
Views: 8544
Reputation: 735
[Solution that worked in my case]
Right click project -> Build Path -> Configure Build Path -> Source -> Remove libCocos2dx
Was somehow building these libraries twice (since it's also included in Libraries tab)
Upvotes: 0
Reputation: 568
in my case.. though the librari is not loaded in project.properties. it return "multiple dex bla bla bla.." I simply remove the library. and the problem solved
Upvotes: 0
Reputation: 1045
The root cause of the problem was that one of the library was using nineoldandroid library as a jar stored in the ./libs dir , while another project was using nineoldandroid by referencing it
Upvotes: 2
Reputation: 11
Check your build path. It is likely that you toggled 2 packages that are importing the same library (for me it was Google API that needed to be untoggled then retoggled)
Upvotes: 0
Reputation: 11
I was running into this issue. My situation was my application project was referencing a library project. Both were including the same external library (both use the library). Once I removed the reference to the external reference in the application project, the error went away. For me, this seemed to be that linking in the library was causing duplicate symbols, which was generating the "Multiple dex file" errors. Just a guess on my part. But, reading the above comments and other posts eventually lead me to see that I was including the library twice.
Upvotes: 1