问题
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