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

后端 未结 12 2032
[愿得一人]
[愿得一人] 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:10

    I have observed today that it doesn't like when you add your library. The solution that worked for me was to add it as an external jar only. I have observed it by doing the steps described by author of this post i.e. Properties -> Java Build Path -> Libraries -> Add External JARs and point to the downloaded gson library.

提交回复
热议问题