Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7909207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:18:32+00:00 2026-06-03T12:18:32+00:00

I wanted to use gson in my android project so I followed a tutorial

  • 0

I wanted to use gson in my android project so I followed a tutorial and done this

  1. Create a new folder, libs, in your Eclipse/Android project.
  2. Right-click libs and choose Import -> General -> File System, then
    Next, Browse in the filesystem to find the library’s parent
    directory (i.e.: where you downloaded it to).
  3. Click OK, then click the directory name (not the checkbox) in the
    left pane, then check the relevant JAR in the right pane. This puts
    the library into your project (physically).
  4. Right-click on your project, choose Build Path -> Configure Build
    Path, then click the Libraries tab, then Add JARs…, navigate to
    your new JAR in the libs directory and add it. (This, incidentally,
    is the moment at which your new JAR is converted for use on
    Android.)

it worked perfectly in android 2.2 but with android 4.0.3 it is throwing an exception
05-06 19:12:18.946: E/AndroidRuntime(602): java.lang.NoClassDefFoundError: com.google.gson.Gson

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:18:35+00:00Added an answer on June 3, 2026 at 12:18 pm

    With android 4, it is important the folder is called libs and not lib or something else, else it will not work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to use groovy for a little ftp script and found this post
I wanted to use a particle system in a kinect project with c sharp
I use log4j in my project and wanted to use FallbackErrorHandler for Backup-Reasons. So,
I believe I read that if you wanted to use Google's App Engine, your
I wanted to use the fluent interface in Castle Windsor. Since this isn't available
I wanted to use this code, and it break on flush() without any exception
I wanted to use a native Dll in my C# .net application as this:
I wanted to use this gem: https://github.com/PRX/apn_on_rails Finally, after digging through the issues, seems
I wanted to use linq as so: MyDBEntities context = new MyDBEntities(); context.MyTable.Where(i =>
I wanted to use a custom background for my UITextFields . This works fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.