当我尝试在Firebase上使用该应用程序创建新的电子邮件和密码帐户时。它不起作用。
Logcat显示此错误
2019-04-01 16:24:35.375 5841-5867 / com.example.login E / eglCodecCommon:glUtilsParamSize:unknow参数0x000082da 2019-04-01 16:24:35.375 5841-5867 / com.example.login E / eglCodecCommon:glUtilsParamSize:unknow参数0x000082da
运行显示此错误
E / eglCodecCommon:glUtilsParamSize:未知参数0x00008cdf E / eglCodecCommon:glUtilsParamSize:未知参数0x00008cdf E / eglCodecCommon:glUtilsParamSize:未知参数0x00008824 glUtilsParamSize:未知参数0x00008824
我已经搜索了所有内容,但没有解决方案。例如将android从6.0.0升级到6.01或更高版本。
package com.example.login;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
public class LoginEmailSignupActivity extends AppCompatActivity {
TextView tvText;
EditText etEmail, etPasswort, etDeinName;
Button btRegistriert;
private FirebaseAuth mAuth;
private FirebaseAuth.AuthStateListener mAuthListener;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login_email_signup);
tvText = findViewById(R.id.tvText);
etEmail = findViewById(R.id.etEmail);
etPasswort = findViewById(R.id.etPasswort);
etDeinName = findViewById(R.id.etDeinName);
btRegistriert = findViewById(R.id.btRegistriert);
mAuth = FirebaseAuth.getInstance();
mAuthListener = new FirebaseAuth.AuthStateListener()
{
@Override
public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth)
{
FirebaseUser user = firebaseAuth.getCurrentUser();
if (user != null)
{
Intent i = new Intent(getApplicationContext(), AppStartActivity.class);
startActivity(i);
}
}
};
}
@Override
protected void onStart()
{
super.onStart();
mAuth.addAuthStateListener(mAuthListener);
}
@Override
protected void onStop() {
super.onStop();
mAuth.removeAuthStateListener(mAuthListener);
}
public void register(View view)
{
String email = etEmail.getText().toString();
String name = etDeinName.getText().toString();
String pass = etPasswort.getText().toString();
if (!email.isEmpty() && !name.isEmpty() && !pass.isEmpty())
{
mAuth.createUserWithEmailAndPassword(email, pass).addOnCompleteListener(this, new OnCompleteListener<AuthResult>()
{
@Override
public void onComplete(@NonNull Task<AuthResult>task) {
Log.d("Reg", "createUserWithEmail:onComplete:" + task.isSuccessful());
if (!task.isSuccessful()) {
Toast.makeText(getApplicationContext(), "Fehler bei der Registrierung", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getApplicationContext(), "Du bist registriert", Toast.LENGTH_SHORT).show();
}
}
});
} else
{
Toast.makeText(this, "Bitte befülle die Felder", Toast.LENGTH_SHORT).show();
}
}
}
我想用Firebase上的电子邮件地址和密码创建一个新用户。
答案 0 :(得分:0)
我找到了解决方案。
您必须输入有效的电子邮件地址和具有必要安全要求的密码。