com.google.android.gms:play-services-auth:16.0.1不包含GoogleSignInOptions类

时间:2019-06-28 12:51:53

标签: android google-api google-drive-api

当我尝试导入此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不确定这里缺少什么,

有人可以帮我解决这个问题吗?预先感谢!

0 个答案:

没有答案