在我连接时调用 connect(),DriveApi
calling connect(), while I am connected, DriveApi
我有一个问题,当我尝试连接到驱动器 api 时,我收到以下错误日志:
Calling connect() while still connected, missing disconnect() for com.google.android.gms.drive.ApiService.Start
一个月前它成功了...
我试过检查 if(mGoogleApiClient.isconnected())
,但同样的问题。尝试 Api 16-21,google-play-services_lib 来自官方来源(一个月前最新)。
有谁知道,问题出在哪里?
@Override
protected void onResume() {
Log.d("activity","resume");
super.onResume();
setContentView(R.layout.splash);
if(onResume == false)
{
onResume = true;
if (mGoogleApiClient == null) {
// Create the API client and bind it to an instance variable.
// We use this instance as the callback for connection and connection
// failures.
// Since no account name is passed, the user is prompted to choose.
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
}
mGoogleApiClient.connect();
}
else
{
android.util.Log.d("archive", "msg");
onResume = true;
Intent intent = new Intent(context, Archive.class);
intent.putExtra("up", (int) 2);
context.startActivity(intent);
//Log.d("intent", intent.getExtras().getString("upload").toString());
}
}
当来自 Google Play 服务应用的所有数据都被删除时,问题已解决。
我认为,问题是当播放服务记住每个已成功授权的应用程序时。但是我的申请没有授权成功
我有一个问题,当我尝试连接到驱动器 api 时,我收到以下错误日志:
Calling connect() while still connected, missing disconnect() for com.google.android.gms.drive.ApiService.Start
一个月前它成功了...
我试过检查 if(mGoogleApiClient.isconnected())
,但同样的问题。尝试 Api 16-21,google-play-services_lib 来自官方来源(一个月前最新)。
有谁知道,问题出在哪里?
@Override
protected void onResume() {
Log.d("activity","resume");
super.onResume();
setContentView(R.layout.splash);
if(onResume == false)
{
onResume = true;
if (mGoogleApiClient == null) {
// Create the API client and bind it to an instance variable.
// We use this instance as the callback for connection and connection
// failures.
// Since no account name is passed, the user is prompted to choose.
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
}
mGoogleApiClient.connect();
}
else
{
android.util.Log.d("archive", "msg");
onResume = true;
Intent intent = new Intent(context, Archive.class);
intent.putExtra("up", (int) 2);
context.startActivity(intent);
//Log.d("intent", intent.getExtras().getString("upload").toString());
}
}
当来自 Google Play 服务应用的所有数据都被删除时,问题已解决。 我认为,问题是当播放服务记住每个已成功授权的应用程序时。但是我的申请没有授权成功