简体   繁体   中英

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; and no cause in the code of class FeedService. This only happens in the minified and obfuscated version published on the PlayStore for testing.

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. 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; put TRANSIENT on everything inside the POJO that shouldn't be SERIALIZED; the Attributes in Firebase must be EXACTLY the same as in POJO; DO NOT USE, for example: myAtributteURI or executeMyAtributteURI(), but myAtributteUri and executeMyAtributteUri(). Remember that it will run in Debug, but it will bug in the minified, obfuscated version. Therefore, follow the Proguard rules specific to FIREBASE. In this link:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM