Solution 1:
Import 3rd party jar package problem, obviously import jar but still report java.lang.NoClassDefFoundError
Steps to resolve:
1. Create a new Lib folder in the root directory of the Android project;
2. Copy the 3rd party jar package you need to import into the Lib folder;
3, right click on the Lib folder, select Bulid
Path–> use as Source
Folder
If you simply introduce a jar, compiling in eclipse is possible, there is no error, but the Java.lang.NoClassDefFoundError error is reported when running on the device. All 3 steps above are critical!
2:
Right-click Project,
Build Path,
Java build path, select libraries
Click on the "Add Library" button on the right.
Select "User Library" and click "Next"
Click on the "User Librarys" button
Click "New ..." in the interface that appears. Button
In the pop-up screen, click on "OK" to pick up a name.
Click on the "Add jars" button to select the third party jar package and click "OK" to complete the operation.
You need to add such an action. There's an order and Export next to the library.
To place the Lib you just added as top