android - com.google.android.gms:play-services-auth:16.0.1 不包含 GoogleSignInOptions 类
问题描述
当我尝试导入此com.google.android.gms:play-services-auth:16.0.1
代码并实现此代码以使用 google rest API 进行身份验证时,
GoogleSignInOptions signInOptions =
new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.requestScopes(new Scope(DriveScopes.DRIVE_FILE))
.build();
GoogleSignInClient client = GoogleSignIn.getClient(this, signInOptions);
// The result of the sign-in Intent is handled in onActivityResult.
startActivityForResult(client.getSignInIntent(), REQUEST_CODE_SIGN_IN);
它说GoogleSignInOptions cannot be resolved to a type
不确定这里缺少什么,
谁能帮我解决这个问题?提前致谢!
解决方案
推荐阅读
- etl - Pentaho Kettle 无法解析数字:对于输入字符串:“null”错误
- python - RuntimeError:张量 a (549) 的大小必须与非单维 1 的张量 b (512) 的大小相匹配
- java - org.hibernate.internal.ExceptionConverterImpl.convertCommitException(JPA,无弹簧)
- html - 输入文本框不适应窗口大小
- html - 在 FullCalendar 上选择日期时,点击精度校准错误
- node.js - 纱线 2 - YN0027:react@unknown 无法解析到令人满意的范围:
- java - Android Studio - 在 Y 坐标上获取屏幕底部的 5th
- c# - 向数据库表添加新记录时出现异常未处理
- javascript - 他们不会加载 glider-js 在 nextjs 中创建的 div 内的元素
- java - 我正在制作一个程序来模拟战争游戏,但是在尝试获取随机卡片时,我总是随机出现错误