本文介绍了不推荐使用Drive.DriveApi.getAppFolder(mGoogleApiClient)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试为Android设置Google Drive API时,在此行

While trying to set up the Google Drive API for Android, In this line

Drive.DriveApi.getAppFolder(mGoogleApiClient)

我都明白了, DriveApi getAppFolder 已过时。

I'm getting that both, DriveApi and getAppFolder are deprecated.

我应该用什么代替?

推荐答案

该弃用已在:

已被替换使用之类的方法,您可以看到:

This was replaced with methods like 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.DriveApi.getAppFolder(mGoogleApiClient)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 17:09