After importing the gson jar package in Android, the solution of Java. Lang. noclassdeffounderror: COM. Google. gson. gsonbuilder appears.

Source: Internet
Author: User
  1. Create a new folder named "Libs" in your eclipse/Android Workspace project (you can do it in Windows Explorer if you're using Windows OS ).
  2. In eclipse, right-click on the project and choose "refresh", this will refresh your project and add the "Libs" folder
  3. Right-click on the "Libs" folder, choose import> General> file system. click next and then browse in your PC to find the parent folder of the library you want to add (N. b. select the parent folder of the library, not the library. jar) and then click OK
  4. Click the Directory Name of the Library (which is displayed in the left panel)-not the checkbox-
  5. On the right panel will be displayed the list of jar files in that folder, select the checkbox of the one you want to install and click Finish (this operation will add the library to your project, now you have to make it available for the project code)
  6. Right-click on your project, choose build path> Configure build path...
  7. In the libraries tab click in add jars..., browse your project andfinr the library in your libs folder, add it.

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.