I ran into issues with my first Android release af...
# moko
t
I ran into issues with my first Android release after adopting Moko Resources and wanted to drop this here in case anyone searches for it later. My dynamically-loaded images (whose filenames all start with
foo_
) were failing to load in my Android release builds until I worked what what I needed to add to my `proguard-rules.pro`:
Copy code
# prevent stripping out dynamically-loaded drawables used for art
-keepclassmembers class <http://com.example.shared.MR|com.example.shared.MR>$images {
  public final dev.icerock.moko.resources.ImageResource getFoo_*();
  public static final dev.icerock.moko.resources.ImageResource foo_*;
}
I believe this is the minimal cut-out required so it shouldn't retain excessive resources or functions (though, as I say that, I'm not 100% sure the line with
foo_
is needed but it should be pretty safe) One thing that tripped me up, especially, is the fact that I needed to include the
()
for the functions since the
*
doesn't match them
a
thanks! if you can - please send PR on github with this info inside readme
t
Will do!