Solution for missing Android system library or Conversion to Dalvik format failed with error 1 error

  • 2020-11-26 18:59:11
  • OfStack

This paper analyzes the solution of the missing Android system library or Conversion to Dalvik failed with error 1 error. To share for your reference, the details are as follows:

Project can be used for many of the problems that occurred when eclipse developed the Android project > clean is easy to solve.

But if it appears that the Android library can't be found, or remove accidentally deleted the Android library, how can you add the Android library again? Java Build Path in eclipse cannot be added to a system library defined as Android 2.1. I tried to manually add Android. jar in the SDK folder, and the result was Conversion to Dalvik format failed with error 1 problem. After a lot of struggle, many netizens said that Project clean could solve the problem, but in my case, it was useless. I found a solution in Baidu: modify the classpath file of the project, which let me understand, directly from other normal projects into the

<classpathentry kind="lib"   path =" The custom jar The address of the " />

Modified into
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
With this refresh of the project, Android system library Android 2.1 comes back, and that error is resolved.

Encountered such a problem again these days, but. classpath file which already contains the above con Path, later in the BBS (http: / / www. eoeandroid. com/thread - 53880-1-1. html) on find new way:
project - > properties - > android label, check a target from the project build target list

Attached is the solution widely circulated on the Internet: conversion to dalvik format failed with error 1

A lower version of android project (e.g. 1.5) in a higher version environment (e.g. 2.2) may cause the above error. The solution is as follows:

1. If the android sdk version is not modified, then the project clean command is applied to a project. (This approach is only compatible with the lower version of the project in the higher version, not a real upgrade)

2. If you modify the android sdk version, the following steps are required:

1) to modify SDK

Select project, build path -- > configure build path --- > library removes references to lower versions of SDK,
Then add External JARs, select the higher version SDK,OK, and save

2) Modification of classpath files

The file may contain an item: < classpathentry kind="lib" path =" The higher version address you specified"
Change her to

<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" />

3) modified AndroidManifest xml

In the ES121en.xml file, the application tag is added after

<uses-sdk android:minSdkVersion="3"></uses-sdk>

4) Modify default.properties (very important)

target=android-3 should be target= ES133en-8. Save.

Just look at your project and the new android 2.2 engineering structure.

I hope this article has been helpful in Android programming.


Related articles: