Android中的Google Fit集成问题

时间:2015-12-11 06:49:14

标签: android google-fit google-fit-sdk

在Android中集成Google Fit时出现此错误:

  

连接失败。原因:
  ConnectionResult {的StatusCode = SIGN_IN_REQUIRED,
  resolution = PendingIntent {3162627d:android.os.BinderProxy@2a943572}}

logcat的:

  

12-11 12:21:00.207
  21307-21307 / com.google.android.gms.fit.samples.basichistoryapi
  I / BasicHistoryApi:Ready 12-11 12:21:00.266
  21307-21307 / com.google.android.gms.fit.samples.basichistoryapi
  I / BasicHistoryApi:正在连接......

     

12-11 12:21:01.369
  21307-21307 / com.google.android.gms.fit.samples.basichistoryapi
  I / BasicHistoryApi:连接失败。原因:
  ConnectionResult {的StatusCode = SIGN_IN_REQUIRED,
  resolution = PendingIntent {3162627d:android.os.BinderProxy@2a943572}}

     

12-11 12:21:01.376
  21307-21307 / com.google.android.gms.fit.samples.basichistoryapi
  I / BasicHistoryApi:尝试解决连接失败

1 个答案:

答案 0 :(得分:1)

我刚刚遇到了同样的问题。 转到开发者控制台,创建新项目, - > API Maqnager - > Credencials - >新证书 - > OAuth cielnt ID 选择Android并设置指纹和包名称。