title: Error while trying to sign up using email and password using firebase in android studio
body: <p>I am having this error while trying to run this code in android studio:</p>
  
  <p>Error:</p>
  
  <pre><code>2019-02-07 20:16:50.708 30406-30406/? E/Zygote: isWhitelistProcess - Process is Whitelisted
  2019-02-07 20:16:50.708 30406-30406/? E/libpersona: scanKnoxPersonas
  2019-02-07 20:16:50.709 30406-30406/? E/libpersona: Couldn't open the File - /data/system/users/0/personalist.xml - No such file or directory
  2019-02-07 20:17:05.426 30406-30406/com.example.servicees E/ViewRootImpl: sendUserActionEvent() returned.
  2019-02-07 20:17:25.789 30406-30406/com.example.servicees E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.example.servicees, PID: 30406
      java.lang.IllegalArgumentException: Given String is empty or null
          at com.google.android.gms.common.internal.Preconditions.checkNotEmpty(Unknown Source:5)
          at com.google.firebase.auth.FirebaseAuth.createUserWithEmailAndPassword(Unknown Source:232)
          at com.example.servicees.MainActivity$1.onClick(MainActivity.java:78)
          at android.view.View.performClick(View.java:6909)
          at android.widget.TextView.performClick(TextView.java:12693)
          at android.view.View$PerformClick.run(View.java:26199)
          at android.os.Handler.handleCallback(Handler.java:789)
          at android.os.Handler.dispatchMessage(Handler.java:98)
          at android.os.Looper.loop(Looper.java:164)
          at android.app.ActivityThread.main(ActivityThread.java:6944)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>package com.example.servicees;
  import android.content.Intent;
  import android.content.SharedPreferences;
  import android.preference.PreferenceManager;
  import android.support.annotation.NonNull;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.support.v7.widget.Toolbar;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  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.database.DataSnapshot;
  import com.google.firebase.database.DatabaseError;
  import com.google.firebase.database.DatabaseReference;
  import com.google.firebase.database.FirebaseDatabase;
  import com.google.firebase.database.ValueEventListener;
  import com.hbb20.CountryCodePicker;
  
  public class MainActivity extends AppCompatActivity {
  
  
      EditText etName, etService, etDes, etCost, etContact, etPass, etEmail;
      Button offer;
      CountryCodePicker ccp;
      private FirebaseAuth mAuth;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_register);
  
          etName = findViewById(R.id.enterName);
          etService = findViewById(R.id.enterService);
          etDes = findViewById(R.id.enterDescription);
          etCost = findViewById(R.id.enterCost);
          etContact = findViewById(R.id.enterContact);
          etPass = findViewById(R.id.enterPassword);
          etEmail = findViewById(R.id.enterEmail);
          ccp = findViewById(R.id.ccpLogin);
  
          /*final String putName=etName.getText().toString();
          final String putService=etService.getText().toString();
          final String putDes=etDes.getText().toString();
          final String putCost=etCost.getText().toString();
          //final String putPass=etPass.getText().toString();
          final String putEmail=etEmail.getText().toString();
          final String putPass=etPass.getText().toString();*/
  
  
          ccp.registerCarrierNumberEditText(etContact);
  
          //final String fullNumber = ccp.getFullNumberWithPlus();
  
          offer = findViewById(R.id.offerBtn);
  
          mAuth=FirebaseAuth.getInstance();
  
          offer.setOnClickListener(new View.OnClickListener() {
               String putName=etName.getText().toString().trim();
               String putService=etService.getText().toString().trim();
               String putDes=etDes.getText().toString().trim();
               String putCost=etCost.getText().toString().trim();
               String putEmail=etEmail.getText().toString().trim();
               String putPass=etPass.getText().toString().trim();
               //ccp.registerCarrierNumberEditText(etContact);
  
               String fullNumber = ccp.getFullNumberWithPlus();
  
              @Override
              public void onClick(View v) {
                  if(notEmpty()){
                  mAuth.createUserWithEmailAndPassword(putEmail, putPass).addOnCompleteListener(new OnCompleteListener&lt;AuthResult&gt;() {
                      @Override
                      public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                          if (task.isSuccessful())
                          {
                              User user = new User(putName, putService, putDes, putCost, fullNumber, putPass, putEmail);
                              FirebaseDatabase.getInstance().getReference("Users").child(putEmail).setValue(user);
                              Toast.makeText(MainActivity.this, "Registered", Toast.LENGTH_LONG).show();
                          }
                          else
                              Toast.makeText(MainActivity.this, "Failed", Toast.LENGTH_LONG).show();
                      }
                  });
                  }
                  else
                      Toast.makeText(MainActivity.this, "All Fields Are Required", Toast.LENGTH_LONG).show();
              }
          });
      }
  
  
      public boolean notEmpty() {
          Boolean checker;
          String checkEmName = etName.getText().toString();
          String checkEmService = etService.getText().toString();
          String checkEmDes = etDes.getText().toString();
          String checkEmCost = etCost.getText().toString();
          String fullNumberCh = ccp.getFullNumberWithPlus();
          String checkEmEmail = etEmail.getText().toString();
          String checkEmPass = etPass.getText().toString();
          if (checkEmName.isEmpty() || checkEmService.isEmpty() || checkEmDes.isEmpty() || checkEmCost.isEmpty() || fullNumberCh.isEmpty() || checkEmEmail.isEmpty() || checkEmPass.isEmpty())
              checker = false;
          else
              checker = true;
          return checker;
      }
  }
  </code></pre>