Correctly import third-party jar packages in Android
Andriod If you introduce a jar package in the wrong way, there are some strange errors.
At work there is a jar package that needs to be called, and it takes a long time to resolve the bug.
At first it was this quote (Eclipse):
Right-click Project, build Path,java build Path,
Select libraries, click "Add External JARs" On the right button,
Then choose the appropriate jar package (most people should do it).
Results Console immediately error: conversion to Dalvik format failed with error 1.
There will also be red forks on the project, although there are no errors in the project.
Clean, the project is OK, but the bin of the apk file and Dex files are gone, run the project error: Can not find **.apk later found that the reason is because the way to import the jar package,
The correct method is as follows:
1, right-click Project, build path, Java build path,
2, select Libraries in the right button click on "Add Library"
3. Select "User Library" and click "Next"
4. Click "User Librarys" button to click "New" in the interface that appears. Button
In the pop-up screen, click on "OK" to pick up a name.
5, click the "Add Jars" button to select the third-party jar package,
Click "OK" to complete the operation. In this case, the jar package will be packaged together into the APK, the problem will be solved!