Noclassdeffounderror of Android Error

Source: Internet
Author: User

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

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.