is having trouble with Google Play services - When using GoogleApiClient, it always trigger onConnectionFailed

前端 未结 5 2090
轮回少年
轮回少年 2021-02-12 23:55

Currently, my app is using

  • minSdkVersion 14
  • targetSdkVersion 23
  • compile \'com.google.android.gms:play-services-gcm:8.4.0\'
  • compile \'com
5条回答
  •  盖世英雄少女心
    2021-02-13 00:23

    It could be caused by multiple problems, have you read the documentation of ConnectionResult? It says this:

    A ConnectionResult that can be used for resolving the error, and deciding what sort of error occurred. To resolve the error, the resolution must be started from an activity with a non-negative requestCode passed to startResolutionForResult(Activity, int). Applications should implement onActivityResult in their Activity to call connect() again if the user has resolved the issue (resultCode is RESULT_OK).

    There is also a lot of information about the error code you receive in this post: Error : ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null}

    The problem could also be that you haven't add the Drive API in your console. But then you should've gotten a logcat message.

    Ok I've also tested the JStock app on:

    Moto G3 with Android 6

    And I am not able to reproduce the bug. But the connection bar at the bottom doesn't change when you set your phone to flight mode.

    I'm not sure if this is any help to you, but let me know.

提交回复
热议问题