1

I just upgrade ADT 17.0.0. I am integrating my project from git hub o windows 7. My project contain 2 .jar one bug-sense and 2nd Google analytic. I have imported project successfully from git. But When I am trying to run my project each time it give this exception. I have tried many things...

  • Remove .jar file from assets and move it to other anther location and update path
  • Add new jars to project and update path
  • Clean and build project multiple time but same result.
01-04 00:38:12.613: E/AndroidRuntime(4537): FATAL EXCEPTION: main
01-04 00:38:12.613: E/AndroidRuntime(4537): java.lang.NoClassDefFoundError: com.bugsense.trace.BugSenseHandler
01-04 00:38:12.613: E/AndroidRuntime(4537):   at com.confiz.ltdmedia.LTDMediaApplication.onCreate(LTDMediaApplication.java:44)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3276)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at android.app.ActivityThread.access$2200(ActivityThread.java:117)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at android.os.Handler.dispatchMessage(Handler.java:99)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at android.os.Looper.loop(Looper.java:130)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at android.app.ActivityThread.main(ActivityThread.java:3687)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at java.lang.reflect.Method.invokeNative(Native Method)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at java.lang.reflect.Method.invoke(Method.java:507)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
01-04 00:38:12.613: E/AndroidRuntime(4537):   at dalvik.system.NativeStart.main(Native Method)
Arslan Anwar
  • 18,746
  • 19
  • 76
  • 105
  • 1
    it will be 100th today? http://stackoverflow.com/questions/9820675/gson-noclassdeffounderror-after-adt-and-sdk-tools-update-to-v17 – Selvin Apr 02 '12 at 14:59
  • I don't see anywhere in the question where it mentions an update to R17, hence I see no reason to downvote this question. Having said that, the link provided may hold the answer. – NickT Apr 02 '12 at 15:12

2 Answers2

6
You can follow following steps
  • Remove all Android Library projects and external jars from the build path.
  • Create a folder named 'libs' in your project.

  • Place all external .jars in that folder, the ADT should now place them under 'Android Dependencies'.

  • Re-import all your previous Android Library projects the normal way.

Original Source:

Gson NoClassDefFoundError after ADT and SDK Tools update to v17

Community
  • 1
  • 1
Muhammad Nabeel Arif
  • 19,140
  • 8
  • 51
  • 70
0

This happens on the update to ADT and SDK Tools v17.

If you already had a libs folder and you are still having this problem you may find the Android Private Libraries are excluded from the build.

You can fix it by: 1. Right click the project in Project Explorer 2. Click Properties 3. Select 'Java Build Path' 4. Select the 'Order and Export' tab 5. The 'Android Private Libraries' option in the list needs to be ticked. 6. Click OK

seb
  • 429
  • 4
  • 7