我的代码已经运行了一年多,在其他地方更改了一些代码后,我没有更改其中的任何代码,MainActivity
这是第一种形式。我现在得到这个error: java.lang.reflect.InvocationTargetException
,然后java.lang.NoClassDefFoundError: com/google/gson/Gson
在尝试这个时:
Gson gson = new Gson();
我还有其他使用 Gson 的程序,它们运行良好。我的项目的 libs 文件夹中有 gson-2.2.4。我已经尝试了几个小时阅读所有其他类似的问题,但我被困住了。猫日志:
06-06 01:47:25.935: I/System.out(4393): debugger has settled (1304)
06-06 01:47:26.120: E/dalvikvm(4393): Could not find class 'com.google.gson.Gson', referenced from method com.comcasystems.routedriver.MainActivity.onCreate
06-06 01:47:26.120: W/dalvikvm(4393): VFY: unable to resolve new-instance 133 (Lcom/google/gson/Gson;) in Lcom/comcasystems/routedriver/MainActivity;
06-06 01:47:26.120: D/dalvikvm(4393): VFY: replacing opcode 0x22 at 0x000b
06-06 01:47:26.120: D/dalvikvm(4393): DexOpt: unable to opt direct call 0x0206 at 0x0d in Lcom/comcasystems/routedriver/MainActivity;.onCreate
06-06 01:47:26.170: E/dalvikvm(4393): Could not find class 'com.google.gson.Gson', referenced from method com.comcasystems.routedriver.MainActivity$1.handleMessage
06-06 01:47:26.170: W/dalvikvm(4393): VFY: unable to resolve new-instance 133 (Lcom/google/gson/Gson;) in Lcom/comcasystems/routedriver/MainActivity$1;
06-06 01:47:26.175: D/dalvikvm(4393): VFY: replacing opcode 0x22 at 0x0024