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

  • SEARCH
  • Home
  • 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 8275119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:58:06+00:00 2026-06-08T07:58:06+00:00

I am developing one android application and in that app I am trying to

  • 0

I am developing one android application and in that app I am trying to use Gson Library for Json serialization and de-serialization. I downloaded the library from the following link:-

http://code.google.com/p/google-gson/downloads/list

I included the gson-2.2.2.jar in Java Build Path, but the application crashes at run time when constructing Gson object:-

Gson gson = new Gson();

in logcat I get

07-24 14:53:21.648: E/dalvikvm(488): Could not find class 'com.google.gson.Gson', referenced from method com.google.gson.examples.android.GsonProguardExampleActivity.onCreate
07-24 14:53:21.648: W/dalvikvm(488): VFY: unable to resolve new-instance 10 (Lcom/google/gson/Gson;) in Lcom/google/gson/examples/android/GsonProguardExampleActivity;
07-24 14:53:21.668: D/dalvikvm(488): VFY: replacing opcode 0x22 at 0x0010
07-24 14:53:21.668: D/dalvikvm(488): VFY: dead code 0x0012-007a in Lcom/google/gson/examples/android/GsonProguardExampleActivity;.onCreate (Landroid/os/Bundle;)V
07-24 14:53:21.788: D/AndroidRuntime(488): Shutting down VM
07-24 14:53:21.788: W/dalvikvm(488): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
07-24 14:53:21.814: E/AndroidRuntime(488): FATAL EXCEPTION: main
07-24 14:53:21.814: E/AndroidRuntime(488): java.lang.NoClassDefFoundError: com.google.gson.Gson
07-24 14:53:21.814: E/AndroidRuntime(488):  at com.google.gson.examples.android.GsonProguardExampleActivity.onCreate(GsonProguardExampleActivity.java:40)
07-24 14:53:21.814: E/AndroidRuntime(488):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-24 14:53:21.814: E/AndroidRuntime(488):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
07-24 14:53:21.814: E/AndroidRuntime(488):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-24 14:53:21.814: E/AndroidRuntime(488):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-24 14:53:21.814: E/AndroidRuntime(488):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-24 14:53:21.814: E/AndroidRuntime(488):  at android.os.Handler.dispatchMessage(Handler.java:99)
07-24 14:53:21.814: E/AndroidRuntime(488):  at android.os.Looper.loop(Looper.java:123)
07-24 14:53:21.814: E/AndroidRuntime(488):  at android.app.ActivityThread.main(ActivityThread.java:4627)
07-24 14:53:21.814: E/AndroidRuntime(488):  at java.lang.reflect.Method.invokeNative(Native Method)
07-24 14:53:21.814: E/AndroidRuntime(488):  at java.lang.reflect.Method.invoke(Method.java:521)
07-24 14:53:21.814: E/AndroidRuntime(488):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-24 14:53:21.814: E/AndroidRuntime(488):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-24 14:53:21.814: E/AndroidRuntime(488):  at dalvik.system.NativeStart.main(Native Method)

Error is:-

07-24 14:53:21.814: E/AndroidRuntime(488): java.lang.NoClassDefFoundError: com.google.gson.Gson

Also, If I include full source of Gson library as another package in my project it all works well.

What am I doing wrong, is this the correct jar??

  • 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-08T07:58:07+00:00Added an answer on June 8, 2026 at 7:58 am

    Seems you have kept the jar file inside lib folder, rather the name should be changed to libs. This was updated newer revisions of ADT (revision 17 onwards).

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

Sidebar

Related Questions

im new one for android. im developing one application that application getting videos from
iam developing one application.In that i need to get the music files from the
We're developing an android application that has several different tabs. We've been trying to
I am currently developing an android app for 1.6 that parses a json file
I'm developing an Android 3.1 Tablet application. I'm going to use this app to
I am developing one application in android. In this I have to login into
I'm developing android application with phonegap . Currently I'm facing one problem with inputbox
I'm developing an Android application. On one activity I have a List with list
Hello i am new in android and i am developing one application in which
Iam developing one application.In that iam placing the radio buttons(uiimageview) on table view and

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.