找到两个具有属性区分大小写的吸气剂或字段,将minifyEnabled设置为True

问题描述

谁能帮助我更改Proguard规则以解决错误

我正在使用Cloud Firestore,并且正在对Firestore执行以下查询,以将数据提取到recylerview中。

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

启用minifyEnabled True后,我将得到错误提示

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

我还通过Android Studio的内置功能创建了setter和getters方法,并且我在模型类中的所有字段都是私有的,仍然会引发相同的错误

public class HospitalModel {

    private String CITY;
    

    public String getCITY() {
        return CITY;
    }

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

    
}

根据我的要求,我无法将Firebase中的字段更改为小写字母。

保护规则

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

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)