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…



  1. Aditya July 20, 2011 at 6:00 pm


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

    Need Help…

    • Soorya July 20, 2011 at 8:10 pm

      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.

  2. Thorsten August 7, 2011 at 5:13 am

    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…

  3. Thanuja September 3, 2011 at 12:37 pm


    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?


    • James September 3, 2011 at 1:06 pm

      Hey Thanuja..
      Why do you need this-“com.mysql.jdbc.Driver”? You can simply connect to MySQL Database wihtout any library. Try this example
      Comment if you have any doubts.
      First try project-> clean your project in your project and then try this.

      • Thanuja September 3, 2011 at 6:16 pm

        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?

        • James September 3, 2011 at 9:08 pm

          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.

  4. Logesh December 17, 2011 at 1:56 am

    Thank You very Much…..;-)


Leave a Reply

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




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.