2014-02-21 147 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