Firebase Error: W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms

狂风中的少年 提交于 2019-12-07 04:37:31

问题


This is my SignUp Acitivity. I'm trying to create a createUserWithEmailAndPassword with Firebase and add some details to the user's profile such as Full Name, Address and Phone Number. I want to add the user profile under the Unique ID in the "users" database assigned to the new User when creating the user with email and password.

public void signUpButtonClicked(View view) {

    if (!TextUtils.isEmpty(email_text) && !TextUtils.isEmpty(pass_text)) {
        mAuth.createUserWithEmailAndPassword(email_text, pass_text).addOnCompleteListener(new OnCompleteListener<AuthResult>() {

            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    String user_id = mAuth.getCurrentUser().getUid();
                    DatabaseReference current_user = mDatabase.child(user_id);
                    current_user.child("Email").setValue(email_text);
                    current_user.child("Full name").setValue(fullName);
                    current_user.child("Nickname").setValue(nick);
                    current_user.child("Address").setValue(fullAdd);
                    current_user.child("Phone Number").setValue(phone);

                    Toast.makeText(MainActivity.this, "You are now REGISTERED", Toast.LENGTH_LONG).show();
                    Intent userProfile = new Intent(MainActivity.this, MenuActivity.class);
                    startActivity(userProfile);

                } else {
                    email.setError(null);
                    pass.setError(null);
                }
            }
        });
   }

This is how my build.gradle looks like.

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'com.google.firebase:firebase-database:11.8.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.firebaseui:firebase-ui-database:1.0.1'
    implementation 'com.android.support:cardview-v7:26.1.0'
    compile 'com.cepheuen.elegant-number-button:lib:1.0.2'

    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
}
apply plugin: 'com.google.gms.google-services'

It doesn't crash but it also doesn't do anything. It just logs this error.

12-26 12:12:53.194 4484-4522/com.example.example.example W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms
12-26 12:12:56.766 4484-4484/com.example.example.example  W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms
12-26 12:12:57.943 4484-4522/com.example.example.example  W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms
12-26 12:13:03.621 4484-4522/com.example.example.example W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms
12-26 12:13:11.635 4484-4522/com.example.example.example W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms

回答1:


Try Downgrading the Firebase Version or Updating Goole play and Play Services in the phone or Emulator.

implementation 'com.google.firebase:firebase-auth:11.4.2'
implementation 'com.google.firebase:firebase-database:11.4.2'
implementation 'com.firebaseui:firebase-ui-database:3.1.0'

or to Firebase version 10.2.6



来源:https://stackoverflow.com/questions/47973887/firebase-error-w-bichannelgoogleapi-firebaseauth-getgoogleapiformethod-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!