android gson解析Json,Could not find class 'com.google.gson.Gson'

来源:互联网 发布:网络商品交易改革 编辑:程序博客网 时间:2024/05/29 11:02

    用gson方式解析Json字符串时,导入gson.jar后,仍然报Could not find class 'com.google.gson.Gson'的异常信息。

尝试这样来解决:右键android项目,选择build path-->configuere build path-->order and export , 然后勾选gson.jar文件,然后点OK。

之后还学要将项目clean,在目录栏中选择project-->clean,选择你的android项目进行clean。

重新运行项目即可。

0 0
原创粉丝点击