搜尋此網誌

2014年10月27日 星期一

【Android】解決 Unable to execute dex: Multiple dex files define


[方法一]
I had the same problem, quite weird because it was happening only when using Eclipse (but it was OK with Ant). This is how I fixed it:
  • Right click on the Project Name
  • Select Build Path -> Configure Build Path
  • In Java Build Path, go to the tab Order and Export
  • Uncheck your .jar library
Only sometimes: In Order and Export tab I did not have any jar library there, so I have unchecked Android Private Libraries item. Now my project is running.

[方法二]
NON OF THE ABOVE METHODE WORKED FOR ME BUT MINE IS WORKED LIKE A CHARM!
The problem happens when user builds the dependent library with eclipse. So to get the solution
Step 1: Delete the library (like support library project v4 or v13) from Eclipse with delete workspace source permanantly
Step 2: Re import the library and include it to your project
Step 3: Clean and Rebuild
DONE!
 
ref:
http://stackoverflow.com/questions/7870265/unable-to-execute-dex-multiple-dex-files-define-lcom-myapp-rarray?page=1&tab=votes#tab-top 



沒有留言: