2014年7月3日 星期四

[Android] Error : Multiple dex files define

[2014-07-03 17:40:01 - Dex Loader] 
Unable to execute dex: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode;

[2014-07-03 17:40:01 - DemoActivity] 
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode;

These err msg seems due to improper settings in "Java Build path".

MIGHT because of you've put your *.lib file in the lib folder AND ALSO including them in build path config.
So you got a conflict.

Solution :
1. Right click on your project 
2. Select Build Path > Configure Build Path.
3. Uncheck your xxx.jar under "Order & Export" tab.

means just put jar file into lib folder, right click then "add to path".
no need to check them in that tab. that works for me.

______________

練一下破英文 XD

錯誤產生的原因應該是因為path上有重複的設定
去Build path 裡面的  "Order & Export"  把 jar 取消打勾就好了
只要把想要的jar放在lib資料夾裡面即可  不用再跑去 "Order & Export" 底下把他們打勾


沒有留言:

張貼留言