java 无法解决导入 com.google.gson.Gson 的问题;

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33722029/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 22:02:31  来源:igfitidea点击:

Getting a import com.google.gson.Gson cannot be resolved;

java

提问by Ted pottel

I got some sampke code from the internet that has the following 2 lines on top import com.google.gson.Gson; import com.google.gson.GsonBuilder; whitch gives me a cannot br resolved error, which I'm assuming I must some how add those libraries, Does anybody know how to do this or could point me to a toturiol?

我从互联网上得到了一些 sampke 代码,在顶部 import com.google.gson.Gson 上有以下两行;导入 com.google.gson.GsonBuilder; whitch 给了我一个无法解决的错误,我假设我必须添加一些如何添加这些库,有没有人知道如何做到这一点或可以将我指向一个 toturiol?

回答by null

Use Maven, you can also use it to search for any package to import (on base of classes or packages you are using), you can also download all releases of the packages you mentioned from here.

使用Maven,您还可以使用它来搜索要导入的任何包(基于您正在使用的类或包),您还可以从这里下载您提到的包的所有版本。