Format failed with error 1 conversion to Dalvik format failed with error 1

Source: Internet
Author: User

When the jar package is added, check that you have deleted the jar package from com to run properly.

Resource Description:

1. If the android SDK version is not modified, 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, buildpath --> Configure build path ---> library, and delete the referenced low-version SDK,
Add externaljars, 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 <classpathentrykind = "con" Path = "com. Android. Ide. Eclipse. ADT. android_framework"/>

3) Modify androidmanifest. xml

In the androidmanifest. xml file, add the <uses-sdkandroid: 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.
Let's take a look at your project and the new android2.2 project structure.

3. You can use project ---------> clean to easily solve many problems that occur during the development of Android projects in eclipse.
However, if the android library cannot be found, or the Android system library is accidentally removed, how can I re-Add the Android system library?

In Java build path in eclipse, you cannot add a defined system library such as Android 2.1. While I try to manually add
The android. jar in the SDK folder has the conversion to Dalvik format failed with error 1 problem. Tossing
After that, many netizens say that using projectclean can solve the problem, but it is useless for me.

Solution:

Modify the project classpath file.
<! -- Note that the. classpath file is stored in the hard disk of the eclipse workspace in the directory of the project. -->
<Classpathentry kind = "lib" Path = "Custom jar address"/>

Change to www.2cto.com
<Classpathentry kind = "con" Path = "com. Android. Ide. Eclipse. ADT. android_framework"/>.

In this way, the project is refreshed, And the Android system library Android 2.1 is back, and the error is also solved.
Bytes --------------------------------------------------------------------------------------------------------------------------
These problems have been encountered in the past few days, but the. classpath file already contains the con path above. Later, I found a new method on the Forum:

Project-> properties-> androidlabel, check a target from the Project Build target list

<! -- In this case, the error cannot be removed. Note that after you enter project> Properties> Android
A is library item, check it, and click OK to solve the error.
And the subsequent methods cannot be solved. Finally, I can see an is library item. Check it and try again. The error is gone -->
(This is library indicates whether it is the meaning of the library. If there is no other way, try again, depending on your situation)


4. there is another situation: Package conflict. Please go to the project directory to delete the same package and re-import it. This is similar to the first case, but this is for other packages, not Android packages.

Solution: Java build path-> libraries-> jars and class folders on thebuild path
Check whether the same jar package exists. Some jar package versions are not necessarily Android jar packages.


Format failed with error 1 conversion to Dalvik format failed with error 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.