3

I am new to firebase and i am doing a signup activity for my app using Official Documentation but when i hit my signup button for register i got this error

Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor" on path: DexPathList[[zip file "/data/app/com.example.farrukh.firebaseaccount-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.farrukh.firebaseaccount-1/lib/x86_64, /vendor/lib64, /system/lib64]]

W/GooglePlayServicesUtil: Google Play services is missing.

I also refer to google but due to low number of users of firebase i didn't get my answer , I also look at these both Link1 Link2 answers but it wouldn't solve my issue.

I have google-service.json in my project i applied all dependencies what firebase project need and updated android studio.

What can i do?

Note : Email/Password is enabled in my firebase Auth Panel

Here's my code

public class MainActivity extends AppCompatActivity {

    private FirebaseAuth mAuth;

    private String mUserName, mUserEmail, mPassword;
    private EditText mEmail, mPass;
    Button signup;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mAuth = FirebaseAuth.getInstance();
        signup = (Button) findViewById(R.id.button);
        mEmail = (EditText) findViewById(R.id.editText);
        mPass = (EditText) findViewById(R.id.editText2);


        signup.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                mUserEmail = mEmail.getText().toString();
                mPassword = mPass.getText().toString();
                mAuth.createUserWithEmailAndPassword(mUserEmail,mPassword).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {
                        Toast.makeText(getApplicationContext(),"Success",Toast.LENGTH_LONG).show();



                        if (!task.isSuccessful()) {

                            Toast.makeText(getApplicationContext(), "Authentication failed.",
                                    Toast.LENGTH_SHORT).show();
                        }
                    }
                });
            }
        });


    }// End OnCreate


}// End Activity 
Community
  • 1
  • 1
Farrukh Faizy
  • 1,203
  • 2
  • 18
  • 30

2 Answers2

5
GooglePlayServicesUtil: Google Play services is missing. 

It seems that you are using a device without Google Play Service.
To test your app when using the Google Play services SDK, you must use either:

  • A compatible Android device that runs Android 2.3 or higher and includes Google Play Store.
  • The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.

More info here.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
3

Got the answer, I just uninstalled the HAXM and reinstall it solves the issue and my app successfully signup the user into my authentication panel. However still getting this line

Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor" on path: DexPathList[[zip file "/data/app/com.example.farrukh.firebaseaccount-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.farrukh.firebaseaccount-1/lib/x86_64, /vendor/lib64, /system/lib64]]
Farrukh Faizy
  • 1,203
  • 2
  • 18
  • 30