title: Firebase signInWithEmailAndPassword and createUserWithEmailAndPassword not working in Android
body: <p>I'm developing Android application where I'm using Firebase Authentication for user login by giving email and password. I have used the basic tutorial provided by Firebase for it but after entering user ID and password I found that neither of the sign in or create account button was working. </p>
  
  <p>When I debugged it, I found that control was not going to:</p>
  
  <pre><code>public void onComplete(@NonNull Task&lt;AuthResult&gt; task)
  </code></pre>
  
  <p>In:</p>
  
  <pre><code>mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener&lt;AuthResult&gt;()
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>mAuth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener&lt;AuthResult&gt;()
  </code></pre>
  
  <p>The code for both sign in and create account is:</p>
  
  <pre><code>private void createAccount(String email, String password)
  {
      Log.d(TAG, "createAccount:" + email);
      if (!validateForm())
      {
          return;
      }
  
      mAuth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener&lt;AuthResult&gt;()
      {
                  @Override
                  public void onComplete(@NonNull Task&lt;AuthResult&gt; task)
                  {
  
  
                          if (task.isSuccessful()) 
                         {
                              Log.d(TAG, "createUserWithEmail:success");
                              FirebaseUser user = fAuth.getCurrentUser();
                              updateUI(user);
                          } 
  
                         else 
                         {
                           Log.w(TAG,"createUserWithEmail:failure",task.getException());
                              Toast.makeText(LoginActivity.this, "Authentication failed.", Toast.LENGTH_SHORT).show();
                              updateUI(null);
                          }
  
                  }
      });
  }
  
  private void signIn(String email, String password)
  {
      Log.d(TAG, "signIn:" + email);
      if (!validateForm())
      {
          return;
      }
  
      mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener&lt;AuthResult&gt;()
      {
          @Override
          public void onComplete(@NonNull Task&lt;AuthResult&gt; task)
          {
              if (task.isSuccessful())
              {
                  Log.d(TAG, "signInWithEmail:success");
                  FirebaseUser user = fAuth.getCurrentUser();
                  updateUI(user);
              }
  
              else
              {
                  Log.w(TAG, "signInWithEmail:failure", task.getException());
                  Toast.makeText(LoginActivity.this, "Authentication failed.", Toast.LENGTH_SHORT).show();
                  updateUI(null);
              }
              if (!task.isSuccessful())
              {
                  mStatusTextView.setText(R.string.auth_failed);
              }
  
          }
      });
  
  }
  </code></pre>
  
  <p>It just skipped the inside part in both the methods and returned nothing. I followed exactly the same way as it was in the tutorial but I'm not understanding what is exact issue. Can someone please help me where I'm going wrong here.</p>