"Conversion to Dalvik format failed with error 1" Error in ANDROID / Eclipse.

By | March 30, 2011

This is a normal error when you import some project into eclipse.
I will show you how to solve this

First try cleaning the project from project->Clean.
If this didn’t work, then try these

Follow these steps
1. Go to Project » Properties » Java Build Path » Libraries and remove all except the “Android X.Y” (eg: Android 1.5). click OK.
2. Go to Project » Clean » Clean projects selected below » select your project and click OK.

Now your error may be gone.
Happy coding…

8 thoughts on “"Conversion to Dalvik format failed with error 1" Error in ANDROID / Eclipse.

  1. Aditya

    Hi………

    I have tried the above idea.
    But it does not worked for me.

    Need Help…

    Reply
    1. Soorya

      Also check if the project target is set. Sometimes if you import project the target may be missing.

      If not then follow the steps.

      project(right click)–>properties–>Android–> The choose a target.–>OK

      After that clean the project…hope this will help.

      Reply
  2. Thorsten

    This solution is fine as long as you need no external libraries – if it works. The problem started after upgrading to SDK Tools / ADT 12; I must say the production quality of Google Tools especially the ADT is more than worse. Look at XCode and compare it with this ADT crap…

    Reply
  3. Thanuja

    Hi,

    I am trying to connect with MySQL database in android application.For this I need to add com.mysql.jdbc.Driver to java buildpath.After adding this driver I am getting “Conversion to Dalvik format failed with error 1” error.

    As you said I tried by adding this driver to project lib folder also,still I am getting the same error.Kindly suggest me what to do?

    Thanuja–

    Reply
      1. Thanuja

        Hi James,
        Actually what I have to do is I want to communicate with MySQL server to retrieve the data available in one of the tables of Database through Android.
        Can you suggest me the correct solution for the above?

        Reply
        1. James

          Thanuja :- In the link I provided you can communicate with a php file. You will get response from a server only as a string.In that php file you can read the database table and send it as a string with some “comma” separated values which you can split and show it in android. In the link I provided it is simple echoing the value send from the android side. IN that place you can have send your parameters and according to that select data from the database, make it a single string and echo it. When you call that php file from android you will get that string as response.

          Reply

Leave a Reply

Your email address will not be published. Required fields are marked *