Android firebase错误W/DynamicModule:未找到com.google.firebase.auth的本地模块描述符类 我尝试基于登录/注册帐户构建应用程序 我创建了它的Firebase并通过电子邮件启用身份验证 我添加了google-play-services.json文件

Android firebase错误W/DynamicModule:未找到com.google.firebase.auth的本地模块描述符类 我尝试基于登录/注册帐户构建应用程序 我创建了它的Firebase并通过电子邮件启用身份验证 我添加了google-play-services.json文件,android,firebase,firebase-authentication,Android,Firebase,Firebase Authentication,我补充说 apply plugin: 'com.google.gms.google-services' compile 'com.google.firebase:firebase-auth:10.0.1' 内置.gridle(应用程序) 在模块中,我添加了 classpath 'com.google.gms:google-services:3.0.0' 这是我的密码 public class splashscr extends Activity implements View.OnClick

我补充说

apply plugin: 'com.google.gms.google-services'
compile 'com.google.firebase:firebase-auth:10.0.1'
内置.gridle(应用程序)

在模块中,我添加了

classpath 'com.google.gms:google-services:3.0.0'
这是我的密码

public class splashscr extends Activity implements View.OnClickListener{

TabHost tab ;
Button logbtn,signup;
EditText email,password,signupemail,signuppassword;
private FirebaseAuth firebaseAuth;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    tab =(TabHost) findViewById(R.id.tabhost);
    logbtn = (Button) findViewById(R.id.btn_login);
    signup = (Button) findViewById(R.id.btn_signup);
    password = (EditText)findViewById(R.id.input_password);
    email = (EditText)findViewById(R.id.input_email);
    signupemail =(EditText)findViewById(R.id.signupinput_email);
    signuppassword = (EditText) findViewById(R.id.signupinput_password);
    firebaseAuth = FirebaseAuth.getInstance();
    logbtn.setOnClickListener(this);
    signup.setOnClickListener(this);
    tab.setup();

    TabHost.TabSpec spec = tab.newTabSpec("tag1");
    spec.setIndicator("",getResources().getDrawable(R.drawable.loginpic));
    spec.setContent(R.id.tab1);
    tab.addTab(spec);

    spec = tab.newTabSpec("tag2");
    spec.setIndicator("",getResources().getDrawable(R.drawable.signupp));
    spec.setContent(R.id.tab2);
    tab.addTab(spec);
}
@Override
public void onClick(View view) {
   final Intent I = new Intent(this,HomeActivity.class);
    final String emailout = signupemail.getText().toString();
    final String passwordout = signuppassword.getText().toString();
    if (view == signup){
        (firebaseAuth.createUserWithEmailAndPassword(emailout,passwordout)).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()){
                    Toast.makeText(splashscr.this, "تم تسجيلك بنجاح ", Toast.LENGTH_SHORT).show();
                    startActivity(I);
                    finish();
                }
                else
                {
                    Log.e("ERROR", task.getException().toString());
                    Toast.makeText(splashscr.this, "فشل التسجيل", Toast.LENGTH_SHORT).show();
                }
                Toast.makeText(splashscr.this,emailout+passwordout, Toast.LENGTH_SHORT).show();
            }
        });
    }
}
}

怎么了?

在Firebase控制台中检查是否允许“匿名身份验证”。它应该能解决你的问题

还要检查清单中的INTERNET权限。这很明显,但是


祝您好运。

尝试将您的客户端与Firebase应用程序重新同步,然后再次添加.json文件。
在android studio 2.3中,只需单击工具>firebase并在助手中检查您的应用程序是否已连接。

登录到您的firebase控制台并启用电子邮件/密码登录方法,即可解决问题。

确保您的模拟器具有Play Store

如果模拟器上未安装Play Store,则会发生此错误


确保您必须妥善保管

互联网许可 、编译库和 仅从firebase身份验证列表中启用一个身份验证

在我的例子中,我从谷歌列表和电子邮件/密码中启用了2个身份验证,所以这不起作用,而是在禁用谷歌之后。。那么它就可以正常工作了


我希望我的回答能对您有所帮助。

这个问题发生在我更改firebase规则后。我的IOS模拟器工作正常,但安卓Emu没有。我通过在模拟器中擦除设备中的所有数据,然后重新启动EMU来修复此问题。可能您甚至不需要从模拟设备中擦除数据。

当我添加internet权限时,出现了相同的问题E/ERROR:com.google.firebase.firebase异常:发生了内部错误。[不允许操作]仍然没有解决方案?
E/ERROR: com.google.firebase.FirebaseException: An internal error has occurred. [ OPERATION_NOT_ALLOWED ]
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.