GoogleAPI 异常中的状态代码 API_UNAVAILABLE 和 API_NOT_CONNECTED 有什么区别?

What is the difference between status code API_UNAVAILABLE and API_NOT_CONNECTED in GoogleAPI exceptions?

我只是对 GoogleAPI 异常中的 API_UNAVAILABLEAPI_NOT_CONNECTED 状态代码感到困惑。谁帮我看看有什么区别。

基于文档:

API_UNAVAILABLE

这是可能的 ConnectionResult 错误代码之一,它在客户端无法连接到 Google Play 服务时提供信息。 GoogleApiClient.OnConnectionFailedListener.

使用了这些错误代码

One of the API components you attempted to connect to is not available. The API will not work on this device or for your app or for this particular account, and updating Google Play services will not likely solve the problem.

API_NOT_CONNECTED

这是 API 个表面共享的 CommonStatusCodes 之一。

The client attempted to call a method from an API that failed to connect. Possible reasons include:

  • The API previously failed to connect with a resolvable error, but the user declined the resolution.
  • The device does not support GmsCore.
  • The specific API cannot connect on this device..

API_UNAVAILABLE: 您尝试连接的 API 个组件之一不可用。 API 无法在此设备上运行,更新 Google Play 服务不太可能解决问题。应避免在设备上使用 API。

检查您是否在清单中放置了正确的设置和密钥。如果可能,请尝试使用不同的设备。

API_NOT_CONNECTED: 客户端试图从连接失败的 API 调用方法。可能的原因包括:

API 之前因可解决的错误而无法连接,但用户拒绝了解决方案。

设备不支持 GmsCore。

特定 API 无法在此设备上连接。