- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
所以我正在尝试向我的应用程序添加身份验证和登录服务,我正在按照 FireBase 上的所有步骤进行操作,尽管我无法完成这一部分,它说错误是
createUserWithEmailAndPassword(Java.lang.String, Java.lang.String) in FireBaseAuth cannot be applied to (Android.widget.text, Android.widget.text)
在此先感谢您提供的任何帮助。代码如下:
public void Register(View view) {
Intent intent = new Intent(LoginActivity.this, BottomActivity.class);
startActivity(intent);
attemptLogin();
mAuth.createUserWithEmailAndPassword(email, password).addOnCompleteListener( this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
Log.d( TAG, "createUserWithEmail:success" );
FirebaseUser user = mAuth.getCurrentUser();
updateUI( user );
} else {
Log.w(TAG, "createUserWithEmail:failed");
Toast.makeText(LoginActivity.this, "Authentication failed", Toast.LENGTH_SHORT).show();
updateUI( null );
}
}
} );
}
邮箱/密码:
private AutoCompleteTextView email;
private EditText password;
最佳答案
这样使用
mAuth.createUserWithEmailAndPassword(email.getText().toString(), password.getText().toString()).addOnCompleteListener( this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
Log.d( TAG, "createUserWithEmail:success" );
FirebaseUser user = mAuth.getCurrentUser();
updateUI( user );
} else {
Log.w(TAG, "createUserWithEmail:failed");
Toast.makeText(LoginActivity.this, "Authentication failed", Toast.LENGTH_SHORT).show();
updateUI( null );
}
}
} );
关于android - FireBase 身份验证 mAuth.createUserWithEmailAndPassword(电子邮件,密码)错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55173213/
Firebase v3 Reference Guide表示 createUserWithEmailAndPassword(email, password)返回 firebase.Promise包含非空
我正在编写允许系统管理员创建新帐户的管理函数。由于在使用 createUserWithEmailAndPassword() 函数将用户注册到 firebase 后,系统管理员已经通过系统身份验证,因此
您好,我正在尝试为我的应用构建一个登录系统。我试图确保在进入下一个 Activity 之前我已登录,但如果我进入 while 循环,firebase 似乎会停止尝试登录。像认真的 wtf 吗?顺便说一
我正在学习使用 Firebase,并开始创建我可以在 Firebase 控制台中看到的用户和密码。但是,方法 createUserWithEmailAndPassword 不起作用,我不知道为什么,可
我正在按照基本教程使用 Firebase 创建电子邮件/密码身份验证。 mAuth.createUserWithEmailAndPassword(email, password)
我有以下连接到 firebase 的设置,但出于某种原因,在浏览器控制台中它显示 auth.createUserWithEmailAndPassword() 不是函数。我的代码有问题吗?这是 logi
我想将显示名称添加到刚刚创建的用户。但是当我 createUserWithEmailAndPassword 它说我的 currentUser 为空。哪里不对了? var name = document
在我的系统中,我需要从经过身份验证的用户创建用户,但为此我需要通过 createUserWithEmailAndPassword 创建用户。方法,当我通过此方法创建用户时,身份验证状态更改为当前创建的
Firebase 有一个函数“createUserWithEmailAndPassword”,可以从前端调用它来创建用户。 是什么阻止了某人多次从您的 JavaScript 代码中手动调用该函数?它不
我希望使用 createUserWithEmailAndPassword() 在 Firebase Auth 中创建用户帐户 - 无需登录用户。我希望用户首先验证电子邮件地址。直接登录用户会导致许多不
使用 createUserWithEmailAndPassword 时有两个问题, 它可以在模拟器上运行,但不能在物理设备上以 Debug模式运行 为了让它在物理设备上运行,我可以为电子邮件部分硬编码
我正在创建一个 Android 应用程序并正在实现登录/注册功能。 我正处于注册 Activity 在我的 Firebase 应用程序中成功创建用户条目的阶段,但是,我似乎无法跟踪任务是否成功。 pr
注册表的思路是 将用户邮箱和密码添加到firebase auth,这样就成功了,然后 使用 uid 作为文档 ID 添加新文档,并插入街道字段和值;到 profile 集合,失败且没有错误。 在fir
我是 firebase 的新手,我创建了一个非常简单的应用程序来注册用户。注册后,该用户未显示在我的 firebase 控制台上的用户列表中。我遵循了 Youtube 上的文档和一些教程。我觉得我做了
我正在尝试使用 createUserWithEmailAndPassword 方法来创建用户,但无法这样做。正在调用 OnAuthenticate 方法,但用户对象为空,并且没有在 firebase
我正在处理另一个不需要后端的客户项目。我想使用 Firebase,因为它可以满足我们的所有需求,而且事实上我们已经构建了大部分微型网站。 我们不想要求我们的用户输入电子邮件,因为我们认为它会泄露太多可
我正在关注关于用户管理的 firebase 文档 var firebase = require('firebase'); // Initialize Firebase firebase.initial
我正在使用调用 firbase.auth().createUserWithEmailAndPassword(email, password); 的 React native 注册表单我在 trycat
在使用 Angular5 作为数据库时,我正在尝试从 createUserWithEmailAndPassword(email, password) 创建一个新用户. 但是,当我输入一个已经存在的电子
尝试使用 firebase 注册新帐户时,帐户已成功创建,但 OnCompleteListener 从未触发,甚至 OnFailureListener 也未触发。 我正在尝试这样做,以便当尝试登录一个
我是一名优秀的程序员,十分优秀!