Proguard causing runtime exception with Android Navigation Component

前端 未结 4 889
臣服心动
臣服心动 2020-12-09 02:18

I\'m experiencing this crash when using proguard after integrating the NavigationComponent (android.arch.navigation:navigation-fragment-ktx:1.0.0-alpha01) into

4条回答
  •  一生所求
    2020-12-09 02:27

    Did face the same issue. The answer above gave me the correct direction to look into. According to navigation docs

    -keep class * extends android.support.v4.app.Fragment{} <-this is not needed 
    

    All you need to do is keep names for data classes which are passed via safe args e.g

    -keepnames class com.your.package.models.*
    

提交回复
热议问题