Conversion to Dalvik format failed with error 1 Solution?

This question already has an answer here:

  • “Conversion to Dalvik format failed with error 1” on external JAR

    71 answers

  • EditText in Listview loses focus when pressed on Android 4.x
  • Extending ArrayAdapter in android
  • android:how to set text view as bold by coding not via XML
  • How Can i INTERCEPT an Incoming SMS With A specific Text
  • Google Maps V2 - Android - Get the current zoom level
  • How to move/rename file from internal app storage to external storage on Android?
  • Failed to retrieve API configs with status: 404 - Google App Engine
  • Android - Get Location Only One Time
  • Android studio: new project vs new module
  • Is it reasonable to have a “back” button in an Android app?
  • Using Dagger for dependency injection on constructors
  • How can I make sure a window always showing above soft keyboard?
  • 13 Solutions collect form web for “Conversion to Dalvik format failed with error 1 Solution?”

    Please see this thread "Conversion to Dalvik format failed with error 1" on external JAR

    more information here: Reason of Conversion to dalvik format failed with error 1

    For those of you reaching here in the last days (see this post date), the last upgrades to ADT 14 have been causing every android project which uses an android library project to fail building with that error.
    I’ve tried this solution and it worked for me.

    Tu sum it up, if you are using android library projects:
    Package Explorer, right-click->Remove From Build Path (ok to unlink), on all the XXX_src in your projects of your workspace.

    Windows 7 Solution if you are obfuscating with ProGuard:

    Confirmed the problem is caused by ProGuard command line in the file
    [Android SDK Installation Directory]\tools\proguard\bin\proguard.bat

    Edit the following line will solve the problem:

    call %java_exe% -jar "%PROGUARD_HOME%"\lib\proguard.jar %*
    

    to

    call %java_exe% -jar "%PROGUARD_HOME%"\lib\proguard.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
    

    Upgrade your Proguard to its latest version i.e., 4.7… Dowload the zip from http://sourceforge.net/projects/proguard/files/latest/download?source=files …. then copy the “lib” and “bin” folders from the zip to your sdk/tools/proguard/ to replace the default or say old “bin” and “lib” …. try exporting your project once again…

    I was getting this because I had manually added android.jar to the build libraries because it was saying it wasn’t finding the android libraries. The fix was to…

    1. Remove android.jar from the build libraries

    2. Right click on the project, go to “Android Tools”, and select “Fix Project Properties”

    Hope this helps.

    If you are using Android SDK tools revision 12, check this link: Android SDK tools revision 12 has problem with Proguard => error conversion to Dalvik format failed with error 1

    Simply cleaning, reimporting, removing libs won’t work! Replacing tools directory with v11 was the only solution for me!

    Had same problem after upgrade to Eclipse Indigo. The whole errors list started with

     [dx] java.lang.IllegalArgumentException: already added: <some library>;
    

    and ended with

      Conversion to Dalvik format failed with error 1
    

    The solution:

    • Right-click on project and select “Properties”
    • Select “Java Build Path” on left tree
    • Select “Library” tab on top
    • You will, probably see this library in the list (it is not jar, but
      Library!, the jar is below)
    • Delete it.

    delete <classpathentry kind="lib" path="libs"/> from .classpath file.

    this works for me.

    This issue comes due to some conflicts in the jar which you might have added in the class path.
    Try removing the specific jar (hit and trail) and see if the error goes off.

    i had the same problem and spent a lot of time trying everything i could, so the only way that worked for me was upgrading ADT to the latest version. So if nothing from the top helps to you just go Help->”Check for Updates”.

    Two easy steps:

    1. CLEAN
    2. BUILD

    While setting up the DropBox example app, I encountered this error.

    The solution was to remove all JAR files from the build path, delete everything inside /libs, paste the required JAR files back in, and add them to the build path again.

    Removed all the projects from workspace
    Import projects back
    Clean 
    

    worked !

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.