Import the jar package in eclipse | the Archive project generates lib through so | conversion to Dalvik format failed with error 1 | export jar from eclipse

Source: Internet
Author: User
Document directory
  • 1. Import the jar package in eclipse
  • Ii. Conversion to Dalvik format failed with error 1
  • Iii. Export the jar package from eclispe
1. Import the jar package in eclipse

The following two methods are used:

Method 1:

1. Right-click the project root directory and click Properties to enter Properties

2.
On the properties page, select Java build path, select the libraries tag, and click Add external jars.

3. Find the jar package to be added and click OK.

4. Right-click the jar and select Properties to specify the native location.


Method 2: (this method was introduced by a colleague, but in the high version of Eclipse, it failed: After the jar is imported, the project still prompts an error, so the APK cannot be compiled .)

1. copy and paste lib (including jar) to the Project

2. Right-click jar and choose add build path)

 

 

Ii. Conversion to Dalvik format failed with error 1

After the package project is imported, many Android. Jar methods cannot be used. Therefore, the original jar is deleted. On the properties page, select Java build path, select the libraries tag, click Add external jars, and re-import.
Android. jar package.

At this time, the project does not prompt that the Android. Jar method cannot be used, and the following error message is left:

Conversion to Dalvik format failed with error 1

The reason is that you cannot directly join the android library.

Solution: edit the. classpath file,

This file may contain this item: <classpathentry kind = "lib" Path = "Your specified High Version address", changed

<Classpathentry kind = "con" Path = "com. Android. Ide. Eclipse. ADT. android_framework"/>


You can.

Clean
.

Iii. Export the jar package from eclispe

Export the file directly, and then add a third-party so Library to the JAR file.

1.
Select the SRC folder
----> Right-click Export... ---> JAVA ---> jar
File ---> next --> select the path and name of JAR file --> next ---> Select Main
Class ---> finish.

2. jar is a compressed package.
, Manually add the associated so Library to the compressed package.

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.