Recently, a new project cannot be started when it is imported and the following error occurs: Conversion to Dalvik format failed with error 1.
After google searches, the basic solution provided by the Internet is as follows or similar:
1. If you do not modify the android sdk version, use the project clean command to act on a project. (This processing method is only compatible with lower-version projects in the high version and is not truly upgraded)
2. To modify the android sdk version, follow these steps:
1) modify the SDK
Select the project, build path --> configure build path ---> library to delete the referenced low-version SDK,
Add External JARs, select SDK of later version, OK, and save
2) modify the classpath File
This file may contain this item: <classpathentry kind = "lib" path = "Your specified High Version address"
Change her to <classpathentry kind = "con" path = "com. android. ide. eclipse. adt. ANDROID_FRAMEWORK"/>
3) Modify AndroidManifest. xml
In the AndroidManifest. xml file, add the <uses-sdk android: minSdkVersion = "3"> </uses-sdk>
4) Modify default. properties (important)
Target = android-3 in the last line of the file (not used in the previous step), and save it as target = android-8.
The results showed that there was no need to modify it. I thought there was a problem with the Environment configuration or SDK package, or there was a problem with eclipse. I had a hard time adding this morning to the afternoon of yesterday, but I still have no clue.
It is still wrong to copy the eclipse and sdk packages of colleagues directly.
Later, I suddenly remembered that I had changed my newly imported library and tried to solve it again.
Solution:
Build Path-> Configure Build Path-> Libraries
Select the Library you added, Edit
Check whether the System library option is selected when the library was created. If it is not selected, check it. After confirming, clean it and try again to see if it is OK.
If you encounter this problem and try a lot of methods to solve it, try it. It may also be caused by this situation...
From the white box