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

后端 未结 12 2227
[愿得一人]
[愿得一人] 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-03 23:56

    I have been trying the same thing and read so many answers and tried so many things but to not vial, but i solved this problem by doing just one click and its simple.

    1) Add your .jar file in libs folder make sure its libs not lib 2) Clean and Build your project you will see that file under libs folder 3) right click the file and go to build path and select add to build path

    Run your project it will work fine. Hope this helps

提交回复
热议问题