[英]Setting Dr. Edit error
I am following all the steps from the readme file of DR. 我正在执行DR 自述文件中的所有步骤 。 Edit for Java.
编辑Java。
I have created a project in Eclipse, I copied java folder to my project and then, I add Drive and OAuth APIs. 我已经在Eclipse中创建了一个项目,将java文件夹复制到了我的项目中,然后添加了Drive和OAuth API。
I can't compile because there is an error with dependence: 我无法编译,因为存在依赖项错误:
import com.google.api.services.oauth2.model.Userinfo;
This error: 这个错误:
The import com.google.api.services.oauth2.model.Userinfo cannot be resolved
Im using google-api-client-1.16.0-rc and google-api-services-oauth2-v2-rev68-1.16.0-rc libraries (they were downloaded from Google Plugin for Eclipse as tutorial says). 我正在使用google-api-client-1.16.0-rc和google-api-services-oauth2-v2-rev68-1.16.0-rc库(如教程所述,它们是从Eclipse的Google Plugin下载的)。
What can I do? 我能做什么?
Thank you. 谢谢。
The latest version of OAuth API doesn't contain the "Userinfo" class, it has been replaced by "Userinfoplus" OAuth API的最新版本不包含“ Userinfo”类,已由“ Userinfoplus”代替
Ref: https://developers.google.com/resources/api-libraries/documentation/oauth2/v2/java/latest/com/google/api/services/oauth2/model/Userinfoplus.html 参考: https : //developers.google.com/resources/api-libraries/documentation/oauth2/v2/java/latest/com/google/api/services/oauth2/model/Userinfoplus.html
So just replace "Userinfo" with "Userinfoplus" and it should work. 因此,只需将“ Userinfo”替换为“ Userinfoplus”,它就可以工作。
import com.google.api.services.oauth2.model.Userinfo;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.