Android Failed to Build Eclipse Android Project Fix

[2013-11-02 08:26:51 - SearchViewDemo] Dx
trouble writing output: already prepared
[2013-11-02 08:26:51 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
[2013-11-02 08:26:51 - SearchViewDemo] Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

Well that happend to me as I tried to build my latest project.
Solution was quite simple but... strange.
Just remove all newer Android SDK build-tools (i.e. 19) until the Version 18.1.1 with the Android SDK Manager.
Restart Eclipse. And it will work.

If not, try to add the Support Libraries (Right click on your Android Project in Eclipse, choose Android Tools, Add Support Library)

Issue and solutions found here: https://code.google.com/p/android/issues/detail?id=61710

18 thoughts on “Android Failed to Build Eclipse Android Project Fix

  1. hi
    i'm new started in use opencv on android .i have some problem when i import opencv2.4.6 it can some projecct sample-opencv-camera-control,15puzzle,blub-detec ,but it can not run sample-opencv-android face detection .plz help me

  2. hey Nico, I've tried everything you wrote here but the problem still exists. any other solution?

  3. again problem is arises that after removing 19 my eclipse can't generate .apk file that could be install in mobile device plz help

  4. Sorry, I haven't worked with android for a while.
    Maybe you should upgrade your Eclipse Version, Eclipse Plugins (especially the Android ones!) and then the ADT and stuff.
    That should help.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.