Proguard configuration for Firebase-UI library

前端 未结 2 1613
悲&欢浪女
悲&欢浪女 2020-12-21 06:11

When creating a APK with proguard enabled, the following exception is thrown when using the FirebaseRecyclerAdapter from the Firebase-UI library (com.firebaseui:fireba

2条回答
  •  长情又很酷
    2020-12-21 06:51

    Solved this by moving the ViewHolder classes that are used by the FirebaseRecyclerAdapter to a dedicated package (e.g. com.mypackage.myapp.viewholders) and adding a rule within the proguard configuration to prevent that classes within this package become obfuscated by proguard:

    -keep class com.mypackage.myapp.viewholders.** { *; }
    

提交回复
热议问题