Android游戏登录(Google Play服务)授权失败,因为未启用Drive API,但我的游戏不需要Drive API

时间:2015-05-25 10:29:29

标签: android api google-play-services

当我尝试使用Google Play服务登录我的游戏应用程序时,登录失败(下面包含错误日志),弹出一个对话框,显示" Google Play服务的未知问题。&#34 ;我将google-play-services_lib正确设置为Android Studio中的库依赖项,我的Activity扩展了BaseGameActivity类。

正如您在日志中看到的那样,它表示错误是因为:" 未配置访问权限。您的项目未启用API(Drive API)。"它来自com.google.android.gms.drive.auth.c。但是,在我的清单文件或我的代码中没有任何地方使用Drive API。我根本不需要这个API,也没有在任何地方导入或包含它。我只是从BaseGameActivity类调用beginUserInitiatedSignIn();方法。 为什么会生成此错误消息?

我注意到日志中的一行特别没有多大意义,但似乎是相关的:

  

I / GLSUser:[GLSUser] getTokenFromCache:[account:,callingPkg:com.soerenwalls.gravlfree,service:oauth2:https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/games https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/appstate]

但我仍然无法理解为什么它似乎试图从驱动器API获取数据。任何帮助都会非常感激。

以下是承诺的错误日志:

05-25 03:00:49.359    1250-1250/? V/GLSActivity﹕ AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
05-25 03:00:49.372    1448-1448/? D/ChimeraSrvcProxy﹕ Creating service proxy ComponentInfo{com.google.android.gms/com.google.android.gms.games.chimera.GamesAsyncServiceProxy}
05-25 03:00:49.372    1448-1448/? D/ChimeraSrvcProxy﹕ Proxying container service ComponentInfo{com.google.android.gms/com.google.android.gms.games.chimera.GamesAsyncServiceProxy} to Chimera service impl com.google.android.gms.games.service.PlayGamesAsyncService
05-25 03:00:49.372    1448-1448/? D/ChimeraCfgMgr﹕ Loading module com.google.android.gms.games from APK com.google.android.play.games
05-25 03:00:49.372    1448-1448/? D/ChimeraModuleLdr﹕ Module APK com.google.android.play.games already loaded
05-25 03:00:49.387    1250-9249/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/games https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/appstate]
05-25 03:00:49.392    1250-9249/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:49.412   1448-21701/? V/AuthAccountOperation﹕ offline access is not requested; requesting access token
05-25 03:00:49.428    1250-1990/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/games https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/appstate https://www.googleapis.com/auth/drive.appdata]
05-25 03:00:49.431    1250-1990/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:49.437   1448-21701/? V/AuthAccountOperation﹕ access token request successful
05-25 03:00:49.463   1448-21698/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
05-25 03:00:49.466   1448-21698/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
05-25 03:00:49.476    1250-1278/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/games https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/appstate]
05-25 03:00:49.481    1250-1278/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:49.490    1250-1990/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/games https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/appstate]
05-25 03:00:49.496    1250-1990/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:49.523   1448-21701/? V/AuthAccountOperation﹕ offline access is not requested; requesting access token
05-25 03:00:49.541    1250-9249/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/games https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/appstate https://www.googleapis.com/auth/drive.appdata]
05-25 03:00:49.543    1250-9249/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:49.552   1448-21701/? V/AuthAccountOperation﹕ access token request successful
05-25 03:00:49.754     746-1172/? I/art﹕ Explicit concurrent mark sweep GC freed 26211(1326KB) AllocSpace objects, 2(32KB) LOS objects, 22% free, 55MB/71MB, paused 1.903ms total 134.343ms
05-25 03:00:50.138    1046-1559/? D/skia﹕ --- SkImageDecoder::Factory returned null
05-25 03:00:50.139    1046-1559/? W/AssetUtil﹕ loadBitmapAssetFromResources: failed to decode bitmap resource for package com.twitter.android
05-25 03:00:50.204    1448-9053/? E/Volley﹕ [220] BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/drive/v2beta/apps/self?prettyPrint=false&fields=id
05-25 03:00:50.210    3043-3105/? D/﹕ PORT_WriteDataCO: tx queue is full,tx.queue_size:10312,tx.queue.count:11,available:6683
05-25 03:00:50.222   1448-21694/? W/BaseAppContext﹕ Using Auth Proxy for data requests.
05-25 03:00:50.225   1448-21698/? E/ClientConnectionOperation﹕ Handling authorization failure
    com.google.android.gms.drive.auth.c: Authorization failed: server returned error: Access Not Configured. The API (Drive API) is not enabled for your project. Please use the Google Developers Console to update your configuration.. See https://developers.google.com/drive/handle-errors for details.
            at com.google.android.gms.drive.auth.g.a(SourceFile:209)
            at com.google.android.gms.drive.auth.g.a(SourceFile:139)
            at com.google.android.gms.drive.api.g.<init>(SourceFile:226)
            at com.google.android.gms.drive.api.a.k.a(SourceFile:46)
            at com.google.android.gms.common.service.g.run(SourceFile:178)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)
05-25 03:00:50.273    1250-2712/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:-4362>, callingPkg: com.soerenwalls.gravlfree, service: oauth2:https://www.googleapis.com/auth/games https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/appstate https://www.googleapis.com/auth/drive.appdata]
05-25 03:00:50.276    1250-2712/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
05-25 03:00:50.556    1448-9055/? E/Volley﹕ [222] BasicNetwork.performRequest: Unexpected response code 403 for https://www.googleapis.com/drive/v2beta/apps/self?prettyPrint=false&fields=id
05-25 03:00:50.559   1448-21698/? E/ClientConnectionOperation﹕ Handling authorization failure
    com.google.android.gms.drive.auth.c: Authorization failed: server returned error: Access Not Configured. The API (Drive API) is not enabled for your project. Please use the Google Developers Console to update your configuration.. See https://developers.google.com/drive/handle-errors for details.
            at com.google.android.gms.drive.auth.g.a(SourceFile:209)
            at com.google.android.gms.drive.auth.g.a(SourceFile:139)
            at com.google.android.gms.drive.api.g.<init>(SourceFile:226)
            at com.google.android.gms.drive.api.a.k.a(SourceFile:46)
            at com.google.android.gms.common.service.g.run(SourceFile:178)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)
05-25 03:00:50.562  20197-20197/? W/GameHelper﹕ disconnect() called when client was already disconnected.
05-25 03:00:50.564  20197-20197/? E/GooglePlayServicesUtil﹕ Internal error occurred. Please see logs for detailed information

0 个答案:

没有答案