android – E/FirebaseInstanceId: Token retrieval failed: INVALID_SENDER-ThrowExceptions

Exception or error:

I can updata to firebase, so my connection , I think there is no problem with my connection
but I can’t retrieve data from firestore.


implementation ''
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation ''
implementation ''
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
implementation ''
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation ''
implementation ""


private TextView showusername;
private TextView showpassword;
private TextView showphone;
private FirebaseFirestore db = FirebaseFirestore.getInstance();
private CollectionReference memRef = db.collection("Member");
protected void onCreate(Bundle savedInstanceState) {
    showusername = (TextView) findViewById(;
    showpassword = (TextView) findViewById(;
    showphone = (TextView) findViewById(;
protected void onStart() {
            .addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
                public void onSuccess(QuerySnapshot queryDocumentSnapshots) {
                    for (QueryDocumentSnapshot documentSnapshot : queryDocumentSnapshots){
                        Member mem = documentSnapshot.toObject(Member.class);
                        String name = mem.getName();
                        String password = mem.getPassword();
                        String phone = mem.getPhone();


2020-02-24 14:32:08.625 3747-3840/? E/FirebaseInstanceId: Token retrieval failed: INVALID_SENDER

I just add

    implementation ''

into my dependencies

but it fail when sycning then build shows

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [] C:\Users\jack0\.gradle\caches\transforms-2\files-2.1\e40595c3c511248facbf0e003354fb90\jetified-firebase-messaging-20.1.0\AndroidManifest.xml as the library might be using APIs not available in 15
Suggestion: use a compatible library with a minSdk of at most 15,
    or increase this project's minSdk version to at least 16,
    or use tools:overrideLibrary="" to force usage (may lead to runtime failures)
How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *