Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
493 views
in Technique[技术] by (71.8m points)

android - API_UNAVAILABLE Google API client

Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}

I am trying to implement the basic g+ login in my app and I have followed the steps exactly like in Drive API for Android Getting Started.

Has anyone seen this error before?

When I click on the signin button I get the prompt to select my google account. Once I select the account nothing happens in my app.

The logs are below:

E/MDM     (32664): [33508] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
I/LoadedApk(32664): getClassLoader :dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.android.location.provider.jar", zip file "/system/framework/com.android.media.remotedisplay.jar", zip file "/data/app/com.google.android.gms-2/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.gms-2/lib/arm64, /vendor/lib64, /system/lib64]]]
I/SurfaceFlinger( 3100): id=2396 Removed SurfaceView (-2/9)
D/LocationInitializer(29281): Restart initialization of location
W/ActivityManager( 3499): userId = 0, bbcId = -10000
W/ActivityManager( 3499): NORMAL SET : dst_category = 701, src_allowCategory = 0,701-1023
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As per Google docs for API_UNAVAILABLE:

One of the API components you attempted to connect to is not available. The API will not work on this device, and updating Google Play services will not likely solve the problem. Using the API on the device should be avoided.

Also check if you have put the correct settings and keys in the manifest. Try on different device if possible. If you post the code how you are creating the client, device type/os etc, it might have narrow down the problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...