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…
Hi………
I have tried the above idea.
But it does not worked for me.
Need Help…
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.
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…
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–
Hey Thanuja..
Why do you need this-“com.mysql.jdbc.Driver”? You can simply connect to MySQL Database wihtout any library. Try this example http://coderzheaven.com/2011/07/android-phpmysql-connection-redone/.
Comment if you have any doubts.
First try project-> clean your project in your project and then try this.
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?
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.
Thank You very Much…..;-)
+1