firebase / geofire-android

GeoFire for Android apps
Apache License 2.0
133 stars 36 forks source link

Issue with R8 in GenericTypeIndicator #30

Closed ArcherEmiya05 closed 1 year ago

ArcherEmiya05 commented 1 year ago

AGP version: 8.0.2 Gradle version: 8.0 GMS version: 4.3.15 GeoFire version: 3.2.0 Firebase RTD version: 20.2.2

Error: Not a direct subclass of GenericTypeIndicator: class com.google.firebase.database.GenericTypeIndicator

Screenshot 2023-07-20 025633 Screenshot 2023-07-20 030416

Source of error: image image

Tried solution: Add the following rule in proguard file

-keepclassmembers class com.google.firebase.database.GenericTypeIndicator{*;}
-keep class * extends com.google.firebase.database.GenericTypeIndicator{*;}

Result: Same issue, no difference.

ArcherEmiya05 commented 1 year ago

Just found a correct solution, this rule is all what we need.

# Exclude from obfuscation when using R8
-keep class com.google.firebase.database.GenericTypeIndicator{*;}