[转载]Android 中导入Gson jar包后出现 java.lang.NoClassDefFoundError: com.google.gson.GsonBuilder的解决办法 - - 博客频道 - CSDN.NET

[转载]Android 中导入Gson jar包后出现 java.lang.NoClassDefFoundError: com.google.gson.GsonBuilder的解决办法 – – 博客频道 – CSDN.NET.

  1. Create a new folder named “libs” in your Eclipse/Android workspace project (you can do it in Windows Explorer if you’re using Windows OS).
  2. In Eclipse, right-click on the project and choose “refresh”, this will refresh your project and add the “libs” folder
  3. Right-click on the “libs” folder, choose Import > General > File System. Click NEXT and then browse in your pc to find the parent folder of the library you want to add (N.B. select the parent folder of the library, not the library.jar) and then click OK
  4. Click the directory name of the library (which is displayed in the left panel) -not the checkbox-
  5. On the right panel will be displayed the list of JAR files in that folder, select the checkbox of the one you want to install and click FINISH (this operation will add the library to your project, now you have to make it available for the project code)
  6. Right-click on your project, choose Build Path > Configure Build Path…
  7. In the libraries tab click in Add JARs…, browse your project andfinr the library in your libs folder, add it.

赞(0) 打赏
分享到: 更多 (0)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏