2013-04-18 64 views
0

403個usageLimits我使用谷歌雲端硬盤API在我的Android應用:谷歌驅動授權返回錯誤在Android SDK <14

private Drive buildService(final GoogleCredential credentials) { 

     return new Drive.Builder(AndroidHttp.newCompatibleTransport(), new GsonFactory(), credentials) 
       .build(); 

    } 

憑證使用的AccountManager獲得。它適用於Android 4.0及以上版本。我可以獲取/插入/刪除文件等。當在Android 4.0下運行時,它始終返回:

"error": { 
    "errors": [ 
    { 
    "domain": "usageLimits", 
    "reason": "dailyLimitExceededUnreg", 
    "message": "Daily Limit Exceeded. Please sign up", 
    "extendedHelp": "https://code.google.com/apis/console" 
    } 
    ], 
    "code": 403, 
    "message": "Daily Limit Exceeded. Please sign up" 
} 
} 

這是兼容性問題嗎?我使用最新的Drive api和google api lib(1.14.1)。謝謝。

回答

0

您應該API控制檯的服務選項卡上啓用「谷歌雲端硬盤API」:https://code.google.com/apis/console/

+0

我已經做了,代碼運行良好的ICS。 403錯誤只發生在ICS前系統上。 – Wenbo

+0

2.3.x應該至少可以正常工作。你還在使用相同的證書來簽署apk嗎? –

+0

是的,完全相同的apk只適用於4.x. – Wenbo