日期:2014-05-16  浏览次数:20607 次

java.lang.NoClassDefFoundError: com.google.gson.stream.JsonReader错误解决方法

在学习JSON例子时遇到此错误,错误内容:
08-06 03:57:43.515: E/AndroidRuntime(513): Uncaught handler: thread main exiting due to uncaught exception
08-06 03:57:43.523: E/AndroidRuntime(513): java.lang.NoClassDefFoundError: com.google.gson.stream.JsonReader
08-06 03:57:43.523: E/AndroidRuntime(513):         at mars.json01.JsonUtils.parseJson(JsonUtils.java:18)
08-06 03:57:43.523: E/AndroidRuntime(513):         at mars.json01.MainActivity$ButtonListener.onClick(MainActivity.java:28)
08-06 03:57:43.523: E/AndroidRuntime(513):         at android.view.View.performClick(View.java:2364)
08-06 03:57:43.523: E/AndroidRuntime(513):         at android.view.View.onTouchEvent(View.java:4179)
08-06 03:57:43.523: E/AndroidRuntime(513):         at android.widget.TextView.onTouchEvent(TextView.java:6541)
08-06 03:57:43.523: E/AndroidRuntime(513):         at android.view.View.dispatchTouchEvent(View.java:3709)
08-06 03:57:43.523: E/AndroidRuntime(513):         at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
08-06 03:57:43.523: E/AndroidRuntime(513):         at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)