简体   繁体   English

发现两个 getter 或属性的区分大小写冲突的字段: s 但是,我没有类的“s”属性,也没有 Firebase

[英]Found two getters or fields with conflicting case sensitivity for property: s however, I don't have an "s" property of the classes nor Firebase

I don't have an "s" property of the classes or in Firebase and line 12 of FeedService points to: import android.os.IBinder;我没有类的“s”属性或 Firebase 和 FeedService 的第 12 行指向: import android.os.IBinder; and no cause in the code of class FeedService. class FeedService 的代码中没有原因。 This only happens in the minified and obfuscated version published on the PlayStore for testing.这只发生在 PlayStore 上发布的用于测试的缩小和混淆版本中。

I've read all the questions and answers on the topic and nothing solves my problem.我已阅读有关该主题的所有问题和答案,但没有解决我的问题。 Good to know: all variables and attributes are in CamelCase PRIVATE, both in Firebase and in POJO Classes and the corresponding getters and setters are PUBLIC.很高兴知道:所有变量和属性都在 CamelCase PRIVATE 中,在 Firebase 和 POJO 类中,并且相应的 getter 和 setter 是 PUBLIC。 Does anyone have an idea how to solve it?有谁知道如何解决它?

    buildTypes {
    release {
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
 E/AndroidRuntime: FATAL EXCEPTION: main
    Process: br.com.site.app, PID: 18293
    d.d.c.m.d: Found two getters or fields with conflicting case sensitivity for property: s
        at d.d.c.m.x.b1.q.a$a.a(Unknown Source:40)
        at d.d.c.m.x.b1.q.a$a.<init>(:5)
        at d.d.c.m.x.b1.q.a.e(Unknown Source:12)
        at d.d.c.m.x.b1.q.a.b(:4)
        at br.com.site.app.service.FeedService.z(:12)
        at d.d.c.m.x.b.d(:11)
        at d.d.c.m.x.c1.d.a(Unknown Source:2)
        at d.d.c.m.x.c1.h.run(:6)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7397)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

Finally, I came up with a solution to my problem:最后,我想出了一个解决我的问题的方法:

Make sure your POJO follows the coding STYLE STANDARDS for attributes, methods, and constants;确保你的 POJO 遵循属性、方法和常量的编码风格标准; put TRANSIENT on everything inside the POJO that shouldn't be SERIALIZED;将 TRANSIENT 放在 POJO 中不应序列化的所有内容上; the Attributes in Firebase must be EXACTLY the same as in POJO; Firebase 中的属性必须与 POJO 中的完全相同; DO NOT USE, for example: myAtributteURI or executeMyAtributteURI(), but myAtributteUri and executeMyAtributteUri().不要使用,例如:myAtributteURI 或 executeMyAtributteURI(),但 myAtributteUri 和 executeMyAtributteUri()。 Remember that it will run in Debug, but it will bug in the minified, obfuscated version.请记住,它将在 Debug 中运行,但它会在缩小的混淆版本中出现错误。 Therefore, follow the Proguard rules specific to FIREBASE.因此,请遵循特定于 FIREBASE 的 Proguard 规则。 In this link:在这个链接中:

https://firebase.google.com/docs/database/android/start#proguard https://firebase.google.com/docs/database/android/start#proguard

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 发现两个 getter 或字段的属性区分大小写冲突 - Found two getters or fields with conflicting case sensitivity for property 发现两个 getter 或属性的区分大小写冲突的字段:状态 - Found two getters or fields with conflicting case sensitivity for property: status 发现两个吸气剂或字段的属性区分大小写冲突:image - Found two getters or fields with conflicting case sensitivity for property: image com.google.firebase.database.DatabaseException:找到两个具有属性区分大小写的getter或字段 - com.google.firebase.database.DatabaseException: Found two getters or fields with conflicting case sensitivity for property: name 构建为发行版APK后出现错误,但调试APK则没有错误-错误:发现两个吸气剂或区分大小写的字段 - Error after building as release APK but no error with debug APK - Error: Found two getters or fields with conflicting case sensitivity Firebase 异常“发现名称冲突的 getter:isChangingConfigurations” - Firebase Exception “Found conflicting getters for name: isChangingConfigurations” R8 混淆导致 @PropertyName 无法工作导致 DatabaseException:找到两个有冲突的 getter 或字段 - R8 obfuscation results in @PropertyName not working causing DatabaseException: Found two getters or fields with conflicting 我想按值从 Firebase 实时数据库中删除值我没有它的关键 - I want to delete value from Firebase Realtime Databse by value i don't have it's key 发现名称冲突的吸气剂 - Found conflicting getters for name Firebase数据库错误:找到名称冲突的getter:isAccessibilityFocusable - Firebase database error : Found conflicting getters for name: isAccessibilityFocusable
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM