Why can't android find com.google.gson.Gson

后端 未结 12 2043
[愿得一人]
[愿得一人] 2021-02-03 23:12

I\'m trying to use GSON in my project, but my application is crashing, with logcat saying that com.google.gson.Gson cannot be found. I\'ve put import com.google.gson.Gson on my

12条回答
  •  情深已故
    2021-02-04 00:11

    i'm sure you have copied the jar into "libs", and also added property> Java Build Path >(tab) Libraries, right?

    my issue was stupid... please check other than Gson jar, if you have two stuffs at least in above tab:

    1. android x.x
    2. Android Dependencies (especially this one, i missed this, eclipse show me an error of "could not find class com.google.gson.xx" )

    simply do a project copy will solve this problem...

提交回复
热议问题