android - 授权错误 Google Drive Android

标签 android authorization google-drive-api

我正在尝试将 Google Drive 导入到我的 Android 项目中。我从 debug.keystore 复制了一个 SHA1 key ,我使用的是相同的包名。对于 Activity ,我使用了来自 Google 云端硬盘的快速入门代码 (https://github.com/googledrive/android-quickstart/blob/master/src/com/google/android/gms/drive/sample/quickstart/MainActivity.java)

我不断收到以下错误(myemail@gmail.com 是应用程序名称的所有者 => Applicationi => 权限):

    W/GLSActivity(12741): [anc] Status from wire: INVALID_CLIENT_ID status: null

    I/GLSUser(12741): GLS error: INVALID_CLIENT_ID myemail@gmail.com oauth2:https://www.googleapis.com/auth/drive.file

    E/ClientConnectionOperation(21217): Handling authorization failure

    E/ClientConnectionOperation(21217): boq: Authorization failed: See https://developers.google.com/drive/android/auth for details on authorizing an application.

这是我的 list :

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="19" />

<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET" >
</uses-permission>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />

    <activity
        android:name="com.example.drivequickstart.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

有什么想法吗?

谢谢

最佳答案

需要设置同意屏幕(API 和授权)

关于android - 授权错误 Google Drive Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21923391/

相关文章:

java - 接口(interface)和同类产品

java - 如何检查响应是否为 xml 格式而不是 HTML?

architecture - API 网关和 ACL

javascript - 使用 Google Drive v3 更新文件内容 (JavaScript)

android - 缓存android中的文件名

android - 防止 WebView 中的 Flash Player 故障,就像 Android 浏览器所做的那样

node.js - 如何使用app.method()进行授权

asp.net - 使用 LogonUser 后出现 UnauthorizedAccessException

java - 使用 Google Drive API 上传文件返回 "400: Bad Request"

google-drive-api - "The domain policy has disabled third-party Drive apps"