Google SigninでFirebaseを使用してユーザーをAndroidアプリに認証しています。このアプリはうまくいきましたが、私はUbuntuとAndroid Studioを再インストールしました。今はもっと働いていません。私は(グーグルのメールアドレスとパスワードを使用して)で、Googleのログインと認証用メールアドレスとパスワードを入れてFirebase Android AppでGoogle Sign Inが失敗しました - GoogleSignInResult @ a84236f
、が返さエラーは、TIS値が返されたと呼ばれる GoogleSignInResult @ a84236f関数であった:
onActivityResult(int型requestCode、int型のresultCode、テントデータ)
は、このコードはどういう意味: GoogleSignInResult @ a84236f?
となり、result.isSuccess() の結果は、偽となります。
機能を完全には、次のとおりです。失敗した
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
// Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);
Log.d("DEIP","request code = 9001? ="+requestCode);
if (requestCode == RC_SIGN_IN) {
GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
Log.d(TAG," isSucess? result.toString ="+result.toString());
Log.d(TAG," +result.isSuccess() ="+result.isSuccess());
if (result.isSuccess()) {
// Google Sign In was successful, authenticate with Firebase
GoogleSignInAccount account = result.getSignInAccount();
firebaseAuthWithGoogle(account);
} else {
// Google Sign In failed
Log.e(TAG, "Google Sign In failed.");
Log.d(TAG,"Failed into onActivityResult");
}
}
}
結果は次のとおりです。
isSucess? result.toString =com.google.android.gms.auth.api.signin**[email protected]**:+ result.isSuccessは()
偽もう一つ、私はコマンド のkeytoolを入れ指紋を= -exportcert -list -v -alias androiddebugkey -keystore〜/ .android/debug.keystore
は私にSHA1フィンガープリントを与えるが、私はFirebaseコンソール指紋にこの値を入れて、firebase.console.google.comサイトは、SHA256のように認識します。
この問題は上記の問題と関連している可能性がありますか?どうすれば修正できますか?
私が試した:
を再SHA1フィンガープリントを生成します。 - Firebaseは私のsh1の指紋が256の指紋であるという情報を与える。リリースキーとデバッグキーも生成しました。
新しいファイルgoogle-services.jsonをAndroid Studioのアプリディレクトリに配置しました。
私は実際の携帯電話にアプリを実行しようとしましたが、エラーは仮想の携帯電話と同じでした。
パッケージ名をAndroidManifes.xmlファイルに、このフィールドをFirebaseコンソールに比較します。
プロジェクトをクリーンアップして再構築します。
無効にインスタント実行
私は依存関係(9.8の新しい値を入れます。0)コンパイルたい
'com.google.firebase:firebase-auth:9.8.0'
依存関係{ fileTree(DIRコンパイル: 'LIBS' が含まれる:[ '*の.jar']) testCompile 'のJUnit:JUnitの:4.12'
compile 'com.android.support:design:24.0.0' compile 'com.github.bumptech.glide:glide:3.6.1' compile 'de.hdodenhof:circleimageview:1.3.0' compile 'com.android.support:appcompat-v7:24.0.0' // Google compile 'com.google.android.gms:play-services-auth:9.8.0' // Firebase compile 'com.google.firebase:firebase-database:9.8.0' compile 'com.google.firebase:firebase-auth:9.8.0' compile 'com.google.firebase:firebase-config:9.8.0' compile 'com.google.android.gms:play-services-appinvite:9.8.0' compile 'com.google.firebase:firebase-messaging:9.8.0' compile 'com.google.android.gms:play-services-ads:9.8.0' compile 'com.google.firebase:firebase-crash:9.8.0' compile 'com.google.firebase:firebase-analytics:9.8.0' // Firebase UI compile 'com.firebaseui:firebase-ui-database:0.4.0' // Testing dependencies androidTestCompile 'junit:junit:4.12' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support:support-annotations:24.0.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-beta3' //tryning to make COntrainlayout work //compile 'android.support.constraint.ConstraintLayout' // compile 'com.google.firebase:firebase-core:9.8.0'
を}
プラグインを適用する:「com.google.gms.google-サービスの プラグインを適用する: 'com.android.application'