1.引入依赖
![](https://img-blog.csdnimg.cn/img_convert/9776fa645709b1427e4044986434cfd1.png)
2.dcloud_properties.xml文件在assets/data目录下
<feature name="OAuth" value="io.dcloud.feature.oauth.OAuthFeatureImpl">
<module name="OAuth-Google" value="io.dcloud.feature.google.GoogleOAuthService"/>
</feature>
3.在project目录下build.gradle配置如下
buildscript {
repositories {
google()
}
dependencies {
...
classpath 'com.google.gms:google-services:4.2.0'
}
}
4.在app目录下的build.gradle配置如下
dependencies {
...
implementation 'com.google.android.gms:play-services-auth:19.2.0'
}