Lost Android system library or conversion to Dalvik format failed with error 1 resolution _android

Source: Internet
Author: User

This article analyzes a workaround for missing the Android system library or conversion to Dalvik format failed with error 1. Share to everyone for your reference, specific as follows:

Many of the problems that arise when you develop an Android project in Eclipse can be easily resolved using Project--------->clean.

But if the Android library is not found, or accidentally removes the Android system library, how do you add the Android library back? In the Java build path within eclipse, there is no way to add a system library, such as Android 2.1, that is defined. And I tried to manually add Android.jar in the SDK folder, resulting in the conversion to Dalvik format failed with error 1 problem. After a while, many netizens have said that using project clean can be solved, but for my situation, no use. In Baidu to find a solution: Modify the project Classpath file, which let me understand, directly from other normal projects inside the

Copy Code code as follows:
<classpathentry kind= "lib" path = "Custom jar address"/>

Modified into
Copy Code code as follows:
<classpathentry kind= "Con" path= "Com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
This refreshes the project, the Android library Android 2.1 is back, and the bug is resolved.

This has been a problem these days, but the. classpath file already contains the above con Path, and later found a new way on the Forum (http://www.eoeandroid.com/thread-53880-1-1.html):
Project-> Properties-> Android label, check a target from the project build target list

A popular solution on the Internet: conversion toDalvik format failed with error 1

An Android low version project (such as 1.5) placed in a high release environment (such as 2.2) may have the following errors, as follows:

1. If you do not modify the Android SDK version, use the project Clean command to work on a project . (This approach is only in the high version of the compatibility of the lower version of the project, does not really upgrade)

2. If you modify the Android SDK version, you need the following steps:

1) Modify the SDK

Select project, build path--> Configure builds path---> Library remove referenced low version SDK,
Then add External JARs, select the high version Sdk,ok, save

2) Modify Classpath file

This file may exist: <classpathentry kind= "lib" path = "The high version of the address you specified"
To change her into

Copy Code code as follows:
<classpathentry kind= "Con" path= "Com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>

3) Modify Androidmanifest.xml

In the Androidmanifest.xml file, add the application tag after the

Copy Code code as follows:
<USES-SDK android:minsdkversion= "3" ></uses-sdk>

4) Modify Default.properties (very important)

The last line of the file (the front is useless #) target=android-3 should be target=android-8, saved.

Take a look at your project and the new Android 2.2 engineering structure is the same.

I hope this article will help you with the Android program.

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.