title: Registration while using Firebase is not working
body: <p>I'm trying to make registration while using google firebase but it is not working. During this, Dialogue box continuously loading and nothing is happening even after couple of minutes.<br>
  I have added internet connection in AndroidMenifests.xml and also Enable Email/Password auth on firebase console.</p>
  
  <p>What should i do to make it working?</p>
  
  <blockquote>
    <p>Here,s my MainActivity</p>
  </blockquote>
  
  <pre><code> public class MainActivity extends AppCompatActivity implements View.OnClickListener{
  
      private FirebaseAuth firebaseAuth;
      private EditText editTextEmail;
      private EditText editTextPassword;
      private ProgressDialog progressDialog;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          firebaseAuth = FirebaseAuth.getInstance();
  
          //initializing views
          editTextEmail = (EditText) findViewById(R.id.editTextEmail);
          editTextPassword = (EditText) findViewById(R.id.editTextPassword);
  
          Button buttonSignup = (Button) findViewById(R.id.buttonSignup);
  
          progressDialog = new ProgressDialog(this);
  
          //attaching listener to button
          buttonSignup.setOnClickListener(this);
  
      }
  
      private void registerUser(){
  
          //getting email and password from edit texts
          String email = editTextEmail.getText().toString().trim();
          String password  = editTextPassword.getText().toString().trim();
  
          //checking if email and passwords are empty
          if(TextUtils.isEmpty(email)){
              Toast.makeText(this,"Please enter email",Toast.LENGTH_LONG).show();
              return;
          }
  
          if(TextUtils.isEmpty(password)){
              Toast.makeText(this,"Please enter password",Toast.LENGTH_LONG).show();
              return;
          }
  
          //if the email and password are not empty
          //displaying a progress dialog
  
          progressDialog.setMessage("Registering Please Wait...");
          progressDialog.show();
  
          //creating a new user
          firebaseAuth.createUserWithEmailAndPassword(email, password)
                  .addOnCompleteListener(this, new OnCompleteListener&lt;AuthResult&gt;() {
                      @Override
                      public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                          //checking if success
                          if(task.isSuccessful()){
                              //display some message here
                              Toast.makeText(MainActivity.this,"Successfully registered",Toast.LENGTH_LONG).show();
                          }else{
                              //display some message here
                              Toast.makeText(MainActivity.this,"Registration Error",Toast.LENGTH_LONG).show();
                          }
                          progressDialog.dismiss();
                      }
                  });
  
      }
  
      @Override
      public void onClick(View v) {
          registerUser();
  
      }
  }
  </code></pre>
  
  <blockquote>
    <p>Here I set up following dependencies in <strong>app.gradle</strong> file</p>
  </blockquote>
  
  <pre><code>    dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      //noinspection GradleCompatible
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'com.google.firebase:firebase-auth:16.0.3'
      implementation 'com.google.firebase:firebase-database:16.0.2'
      implementation 'com.google.firebase:firebase-storage:16.0.2'
      implementation 'com.google.firebase:firebase-crash:16.2.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.google.firebase:firebase-core:16.0.3'
  //cloud dep
      implementation 'com.firebase:firebase-client-android:2.3.1'
  
  
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>and <strong>build.gradle</strong> file</p>
  
  <pre><code>    dependencies {
          classpath 'com.android.tools.build:gradle:3.1.0'
          classpath 'com.google.gms:google-services:4.0.1'
  }
  </code></pre>
  
  <blockquote>
    <p>Here's AndroidManifests.xml</p>
  </blockquote>
  
  <pre><code> &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.irfan.reg"&gt;
      &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:roundIcon="@mipmap/ic_launcher_round"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name=".MainActivity"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/j7In0.png" rel="nofollow noreferrer">That's my Logcat image</a></p>