Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/373.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/222.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在firebase中创建具有电子邮件和密码的用户_Java_Android_Firebase_Firebase Authentication - Fatal编程技术网

Java 在firebase中创建具有电子邮件和密码的用户

Java 在firebase中创建具有电子邮件和密码的用户,java,android,firebase,firebase-authentication,Java,Android,Firebase,Firebase Authentication,我将创建一个聊天应用程序。例如,我有两个EditText,其中包含电子邮件和密码。我想在Google Firebase上创建带有电子邮件和密码的用户身份验证。我的代码不工作。我找不到我的错误。请给我一个解决方案 主要活动 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ap

我将创建一个聊天应用程序。例如,我有两个EditText,其中包含电子邮件和密码。我想在Google Firebase上创建带有电子邮件和密码的用户身份验证。我的代码不工作。我找不到我的错误。请给我一个解决方案

主要活动

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.example.atik_faysal.test.MainActivity">

    <EditText
        android:id="@+id/e_email"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="52dp"
        android:layout_marginStart="52dp"
        android:layout_marginTop="36dp"
        android:ems="10"
        android:inputType="textPersonName" />

    <EditText
        android:id="@+id/e_password"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="13dp"
        android:ems="10"
        android:inputType="textPassword"
        android:layout_below="@+id/e_email"
        android:layout_alignLeft="@+id/e_email"
        android:layout_alignStart="@+id/e_email" />

    <Button
        android:id="@+id/login"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="signIn"
        android:layout_marginTop="16dp"
        android:text="Log in"
        android:layout_below="@+id/e_password"
        android:layout_alignLeft="@+id/e_password"
        android:layout_alignStart="@+id/e_password" />

    <Button
        android:id="@+id/register"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="registerUser"
        android:text="registerUser"
        android:layout_alignBaseline="@+id/login"
        android:layout_alignBottom="@+id/login"
        android:layout_toRightOf="@+id/login"
        android:layout_toEndOf="@+id/login"
        android:layout_marginLeft="27dp"
        android:layout_marginStart="27dp" />
</RelativeLayout>

如何让你的应用程序接受特定链接,例如

<data android:pathPrefix="www.example.com" android:scheme="http"/>


然后发送一个链接,例如
http://www.example.com/abcd
,用户应使用应用程序打开电子邮件,最后应用程序将检查链接“打开的链接”是否与“发送的链接”相同。

您能否详细说明您的代码“不起作用”的原因?你在期待什么,到底发生了什么?如果您遇到异常/错误,请发布发生该异常/错误的行以及异常/错误详细信息。请输入这些详细信息,否则我们可能无法提供帮助。当我插入电子邮件和密码并单击RegisterUser按钮时,未创建新用户。我不知道为什么它不起作用。
apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }
    defaultConfig {
        applicationId "com.example.atik_faysal.test"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile files('libs/activation.jar')
    compile files('libs/additionnal.jar')
    compile files('libs/mail.jar')
    compile 'com.google.firebase:firebase-database:11.4.0'
    compile 'com.google.firebase:firebase-auth:11.4.0'
    compile 'com.google.firebase:firebase-crash:11.4.0'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.firebase:firebase-client-android:2.3.1'
    compile 'com.cuboid:cuboidcirclebutton:1.0.3'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
    testCompile 'junit:junit:4.12'
    debugCompile 'com.android.support.constraint:constraint-layout:1.0.2'
}
apply plugin: 'com.google.gms.google-services'
<data android:pathPrefix="www.example.com" android:scheme="http"/>