以下是我的代码,用于创建与Google云端硬盘服务相关联的GoogleApiClient实例:
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this /* FragmentActivity */, this /*
OnConnectionFailedListener */)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.build();
带
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.android.gms:play-services-drive:15.0.0'
我收到了警告
'API'已弃用
如何阻止此警告?
答案 0 :(得分:0)
已弃用Google Drive API的全局答案https://stackoverflow.com/a/47843323/9581467 有适当的文档链接
感谢@Arshad和@noogui