eddydn / ChatApp

First Commit
59 stars 74 forks source link

Error:(82, 37) error: cannot access zzans class file for com.google.android.gms.internal.zzans not found #3

Open aapkanews77 opened 6 years ago

aapkanews77 commented 6 years ago

@Override public void onClick(View v) { EditText input=findViewById(R.id.input); FirebaseDatabase.getInstance().getReference().push().setValue(new ChatMessage(input.getText().toString(), FirebaseAuth.getInstance().getCurrentUser().getEmail())); input.setText(""); } });

    // check if not sign in then navigate in signin page
    if(FirebaseAuth.getInstance().getCurrentUser()==null)
    {
        startActivityForResult(AuthUI.getInstance().createSignInIntentBuilder().build(),SIGN_REQUEST_CODE);
    }
    else{
        Snackbar.make(activity_main,"welcome"+FirebaseAuth.getInstance().getCurrentUser().getEmail(),Snackbar.LENGTH_SHORT).show();
        //Load content
        displayChatMessage();
    }
}

// Please resolve my Problem that zzans can' access files

charlie0044 commented 6 years ago

hello, did you find a solution to this? I have exactly same error code with exactly same source code.

thanks.

charlie0044 commented 6 years ago

hello buddy, i have found the issue and resolved it on mu end. make sure you have following implement on your app gradle

implementation 'com.google.firebase:firebase-auth:16.0.3'

adding this worked for me