Proguard breaking audio file in assets or raw

前端 未结 3 814
小鲜肉
小鲜肉 2020-12-18 04:23

I have an activity that plays a beep sound with MediaPlayer that works fine and used to work fine even in the proguarded production version. With the latest release it now s

3条回答
  •  余生分开走
    2020-12-18 05:01

    I find it odd that it is telling you that is a drawable resource:

    File res/raw/beep.ogg from drawable resource ID

    I think you need to tell it to also keep the R class. This is what I use in an app that also loads .ogg files from raw.

    -keep class *.R
    
    -keepclasseswithmembers class **.R$* {
        public static ;
    }
    

提交回复
热议问题