【问题标题】:Authorization error Google Drive Android授权错误 Google Drive Android
【发布时间】:2014-08-28 00:24:28
【问题描述】:

我正在尝试将 Google Drive 导入我的 Android 项目。我从 debug.keystore 复制了一个 SHA1 密钥,并且我使用了相同的包名称。对于 Activity,我使用了来自 Google Drive (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.

这是我的清单:

<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>

有什么想法吗?

谢谢

【问题讨论】:

    标签: android authorization google-drive-api


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      一开始我不知道同意屏幕是什么意思。它位于 Google 控制台上,是凭据下方显示的下一个选项。如果其他人不知道这是哪里/是什么,希望这会有所帮助。

      【讨论】:

      • 如果你回来,请查看我的新答案。
      • 我已经弄明白了,不过还是感谢您提供的链接。我很欣赏这个手势
      【解决方案3】:

      我有这个,我做的一切都是正确的,但仍然失败。最后我创建了一个新的 Google Developers Console 中的项目。在那里我再次创造了一切。

      【讨论】:

      • 我有新的答案给你,在这种情况下。
      【解决方案4】:

      您设置的所有内容都已完成。现在,您只需在 Google 控制台开发人员上添加同意屏幕。请到https://developers.google.com/console/help/new/#userconsent完成这篇。

      【讨论】:

        猜你喜欢
        • 2015-12-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-02-08
        相关资源
        最近更新 更多