나는 firebase와 firebase auth ui 라이브러리를 사용하는 프로젝트를 가지고 있습니다. 문제는 내가 두 번째 또는 두 번째로로드하려고 시도한 다음 "개발자 오류"라고 말하는 축배 메시지를 표시 할 때 Google 로그인을 사용하여 로그인 할 수 없다는 것입니다. 이메일과 비밀번호로 로그인 할 수 있습니다. 그리고 이것은 서명 된 apks의 문제 일뿐입니다. Google을 디버깅 할 때 로그인이 정상적으로 작동합니다.Firebase Auth Ui Google 로그인 "Developer Error"
내 proguard-rules.pro에서 minifyEnabled를 false로 설정했습니다.
그리고 내 firebase 프로젝트에 SHA-1을 추가하고 올바른 json 파일을 다운로드했습니다. 응용 프로그램 레벨 build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-auth:11.4.2'
compile 'com.firebaseui:firebase-ui-auth:3.1.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
에서
종속 블록은 여기 내 AuthStateListener
mAuthStateListener = new FirebaseAuth.AuthStateListener() {
@Override
public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
FirebaseUser user = firebaseAuth.getCurrentUser();
if (user != null) {
signedInInitialized();
} else {
signedOutCleanUp();
startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setTheme(R.style.FirebaseSignInTheme)
.setIsSmartLockEnabled(false)
.setAvailableProviders(
Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build()))
.build(),
RC_SIGN_IN);
}
}
};
로그 캣가 오류 또는 아무것도 표시되지 않습니다. 이 일이 생길 때 나는 logcat을 게시 할 것이지만 서명 된 apk에서 logcat을 얻는 방법을 모른다. 이것은 apk에 서명 할 때만 발생한다.
나는 이것을 며칠 동안 알아 내려고 노력했지만 머리를 쓰지 않는 것처럼 보인다.
감사합니다.
정말 고마워요! –
기꺼이 도와 드리겠습니다. :) –
Debug와 Release SHA1을 모두 추가했지만 여전히 작동하지 않습니다. 그러나 디버그 모드에서 작동합니다. –