基本上,Android谷歌登录在用户按下登录按钮之后和谷歌完成登录过程之前闪烁一个小的空白框。这一切都发生得非常快,但我想摆脱白盒子。我假设这个白框是尝试显示进度条的失败。
编辑:添加正在发生的事情的图形重新创建...
我在三星Tab 3上测试。
此问题不包括用户首次登录或撤消访问后的情况。
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.requestIdToken(getString(R.string.google_server_client_id))
.build();
// google login stuff
googlebutton = (com.google.android.gms.common.SignInButton) findViewById(R.id.googlebutton);
googlebutton.setOnClickListener(this);
googlebutton.setStyle(SignInButton.SIZE_STANDARD, SignInButton.COLOR_LIGHT);
// Build GoogleApiClient with access to basic profile
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.build();
和登录功能......
private void gSignIn() {
Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
startActivityForResult(signInIntent, RC_SIGN_IN);
}
理想情况下,我想恢复正常的进度条行为。
这是我的傻瓜......
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.0'
defaultConfig {
applicationId "xxxxxxxxx"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-plus:8.4.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
//compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.android.support:design:23.0.1'
}
试着这个不确定:它只是你在manifest中应用于该活动的标签,从该活动中删除它
android:label="@string/app_name"
或者检查你的布局文件是否存在一些可见的空视图。谢谢。
我想你还没有补充
在依赖部分之外。还在项目级gradle文件中添加classpath
更新谷歌播放服务,Android平台工具和Android构建工具。有时它会发生由于版本冲突试试这个,但我不确定这一点