Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when building apk - "Multiple dex files define Lcom/google/ads/Ad"

I've been tearing my hair out over this one, for the past 3 hours I've been trying to fix it but have been unable to. I've created an android app and I'm ready to put it on the android market but I get this error when trying to export to an apk.

Unable to execute dex: Multiple dex files define Lcom/google/ads/Ad;

I've read a bunch on the problem and tried quite a few solutions but nothing has seemed to help. I've cleaned and rebuilt, I've delete the bin folder, I've made sure that the bin folder is excluded build path. Nothing's worked. If anyone could help me I would really appreciate it.

like image 482
Stratus Avatar asked Dec 31 '11 02:12

Stratus


2 Answers

Untick the admob jar file in the "order and export" part of the "configure build path".

like image 129
Matt Avatar answered Sep 21 '22 22:09

Matt


On another post with a problem similar to yours the only thing mentioned that you have not already considered was updating Eclipse. I don't know how or what order that you have done these "fixes" but another poster mentioned that all at once he deleted the bin directory for his project, cleaned and rebuilt the project and restarted Eclipse. After that the error disappeared.

Good Luck- Lijap

like image 35
Lijap Avatar answered Sep 20 '22 22:09

Lijap