2014-02-21 148 views
3

我正在尝试将Google Drive导入到我的Android项目中。我已经从debug.keystore复制了SHA1密钥,并且使用了相同的软件包名称。对于活动我用谷歌从驱动器的快速启动代码(https://github.com/googledrive/android-quickstart/blob/master/src/com/google/android/gms/drive/sample/quickstart/MainActivity.java授权错误Google Drive Android

我不断收到以下错误([email protected]是应用程序的名称=> Applicationi =>权限的所有者):

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

    I/GLSUser(12741): GLS error: INVALID_CLIENT_ID [email protected] 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> 

任何想法?

感谢

+0

你解决了吗? – powder366

回答

4

需要设定同意画面(API的&验证)

+2

请详细解释... – powder366

0

我不知道什么被同意画面起初的意思。它位于Google控制台上,是凭据下方显示的下一个选项。希望这有助于其他人不知道这是什么/这是什么。

+0

如果你回来,请查看我的新答案。 – KimKha

+0

我已经想通了,但是无论如何感谢你的链接。我很欣赏这个姿势 – jdkorv11

0

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

+0

在这种情况下,我有新的答案给你。 – KimKha