I am unable to build my application I am running the latest build tools downloaded today, this started happening after the update.
-dex:
[dex] Converting
Be very careful about all source files you attach to/have in your project. I found this problem in two situations:
src
not as a library, but directly into my src directorySo all answers which says that you shouldn't put your bin/ directory into class path are also correct, but in situation where you have error like:
[2013-08-02 20:22:03 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/facebook/android/AsyncFacebookRunner$1;
[2013-08-02 20:22:03 - Activity] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/facebook/android/AsyncFacebookRunner$1;
you should look for same jars in project/libraries (this should be founded by Android Eclipse environment in most cases) or look into all sources attached to project to find multiple occurance of (as in example code above) of class com.facebook.android.AsyncFacebookRunner
I spent hours cleaning, creating new projects, uninstalling-reinstalling sdk... nothing worked. I didnt have any library project either ( i just had some jar files under lib). Howerver, In the end I fixed it and my steps were:
If you're having issues because of Multiple DEX files
Remove the entire target folder and build the project again. This won't affect your project cause everything in the target folder is built again.
I was seeing this same problem. If you're using Android Studio, you need to make sure you don't have the 'bin' or 'gen' folders included in any of your projects when you're compiling.
After removing this I was able to compile successfully
Something happened yesterday to my system (and another here at work) where the SDK wanted to push the platform tools update but then I was unable to use it at all, etc.
I ended up moving my SDK out of the way and reinstalling it, then everything worked as it always had. I did not have your dex specific issue, but I suspect the update push yesterday broke a good many things. Good luck.
You can:
Delete folders <.settings>
, <bin>
, <gen>
, and files <.classpath>
, <.project>
and <project.properties>
.
Delete your project in Eclipse (right button, <Delete>
) without deleting the source files.
Create a new Android project and select <Create project from existing sources>
from your previous sources.
Import external libs, if needed in the build path.
It should solve this annoying problem.