1

Can anyone help me in changing the proguard rules to solve this error.

I am using cloud firestore and I am doing below query on firestore to fetch data into recylerview.

 Query query = GlobalState.firebaseDB().collection("HOSPITALS")
 .orderBy("DATE_OF_VISIT",Query.Direction.DESCENDING)
 .whereEqualTo("CITY",GlobalState.myfriend.getCityname());

Once I enabled minifyEnabled True, I am getting below error.

java.lang.RuntimeException: Found two getters or fields with conflicting case sensitivity for property: city

And also I have created setters and getters methods from Android studio's built-in functionality and all my fields in the model class are private, still it throws the same error.

public class HospitalModel {

    private String CITY;
    

    public String getCITY() {
        return CITY;
    }

    public void setCITY(String CITY) {
        this.CITY = CITY;
    }

    
}

For my requirement, I cannot change the fields in firebase to smallletters.

Proguard rules

-keepclassmembers class com.icare.startup.HospitalModel { *; }

enter image description here

Taslim Oseni
  • 6,086
  • 10
  • 44
  • 69
Droid
  • 13
  • 3
  • Please edit your question and add your database structure as a screenshot. – Alex Mamo Aug 11 '20 at 10:11
  • 1
    Does this answer your question? [Proguard configuration for Firebase-UI library](https://stackoverflow.com/questions/34710582/proguard-configuration-for-firebase-ui-library) – Soni Sol Aug 12 '20 at 23:17
  • @JoséSoní The link you pointed was a different error, and almost the same way i have given my proguard rules, but it did not help. – Droid Aug 13 '20 at 04:30
  • @JoséSoní I did moved my viewholder to package, and applied proguard rule mentioned in the link, but still the same error coming.. – Droid Aug 13 '20 at 07:54

0 Answers0