My code have been working fine for over a year and after changing some code in other places, I did not change any code in the MainActivity
and that is the first form. I now get this error: java.lang.reflect.InvocationTargetException
and then java.lang.NoClassDefFoundError: com/google/gson/Gson
when trying this:
Gson gson = new Gson();
I have other programs where I use Gson and they works fine.I have the gson-2.2.4 in the libs folder in my project. I have tried for hours reading all other similar problems but I'm stuck. Cat Log:
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