Error when adding Gson library external Jar

半腔热情 提交于 2019-12-23 05:16:17

问题


i would like to use the GSON library, a Java library that can be used to convert Java Objects into their JSON representation but it not works.

Properties -> Java Build Path -> Libraries -> Add External JARs (add the downloaded gson jar)

I get this error:

caused by: java.lang.NoClassDefFoundError: com.google.gson.GsonBuilder

Help


回答1:


Try creating a folder call 'lib' under your project and copy the gson jar over to 'lib' directory and repeat your step above.



来源:https://stackoverflow.com/questions/11961605/error-when-adding-gson-library-external-jar

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!