Drive.DriveApi.getAppFolder(mGoogleApiClient) 已弃用
Drive.DriveApi.getAppFolder(mGoogleApiClient) deprecated
尝试为 Android 设置 Google 驱动器 API 时,在这一行
Drive.DriveApi.getAppFolder(mGoogleApiClient)
我了解到 DriveApi
和 getAppFolder
都已弃用。
我应该用什么来代替它?
已在 this reference page 中正式宣布弃用:
This interface was deprecated. Gain access to the Drive API with one
of the Drive#get*Client() methods instead.
这已被替换为 getDriveClient and you can see sample code demos in googledrive/android-demos:
等方法
private void initializeDriveClient(GoogleSignInAccount signInAccount) {
mDriveClient = Drive.getDriveClient(getApplicationContext(), signInAccount);
mDriveResourceClient = Drive.getDriveResourceClient(getApplicationContext(), signInAccount);
onDriveClientReady();
}
查看 Drive API for Android 了解更多信息。
尝试为 Android 设置 Google 驱动器 API 时,在这一行
Drive.DriveApi.getAppFolder(mGoogleApiClient)
我了解到 DriveApi
和 getAppFolder
都已弃用。
我应该用什么来代替它?
已在 this reference page 中正式宣布弃用:
This interface was deprecated. Gain access to the Drive API with one of the Drive#get*Client() methods instead.
这已被替换为 getDriveClient and you can see sample code demos in googledrive/android-demos:
等方法private void initializeDriveClient(GoogleSignInAccount signInAccount) {
mDriveClient = Drive.getDriveClient(getApplicationContext(), signInAccount);
mDriveResourceClient = Drive.getDriveResourceClient(getApplicationContext(), signInAccount);
onDriveClientReady();
}
查看 Drive API for Android 了解更多信息。