[Errors for learning Android] conversion to dalvik format failed with erro

Source: Internet
Author: User
Tags erro

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, 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 means a 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.

This error occurs when the last signpost-core-1 [1]. 2.1.1.jar conflicts with the signpost-core-1.2.1.1.jar, so check if the same jar package exists.

 

The fourth issue is that I learned from others about an andengine game engine code. I set his libs folder to source folder, later, I added to buildpath to various jar packages, and then I encountered a problem. I found a lot of solutions and did not solve them, later, I carefully observed and found that my problem was similar to the fourth point. I removed all the jar files and re-loaded them. This solved the problem. Haha, I will summarize the methods here, easy to view.

 

Author: zhyl8157121

 


Related Article

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.