It has been the 3rd day that I am struggling with progourd! I am new to this and I just wanted to upload my signed bundle to Play console. I encountered these two major issues 1&2:
1- The most basic function not working !
-After a lot of frustration I found out bugs generated in my code was due the bundle making process : a) I unzipped the app-release.aab and noticed the png files in the drawable folder are all corrupted! which consequentially were causing my app not to be able to do one of its main functions! b) Some of libraries were not accessible or working at all causing crashes!
- you might know how difficult it is to debug an app that is uploaded to play console so the work Around (PROOF) was tht I simply set inside grdleBuild:
ShrinkResources = false
and all the above started to work fine after downloading from playstore! and I checked the bundle before uploading it (by 7zip app) and the png files were okay there.
2- The poor documentation !!
For the last two days I have been looking around to stackOverflow and proguard own website looking for solutions and yet I have not been able to found anything useful a) I learnt that I needed to exclude this resources from being shrink but I could not find any clear samples saying how can I do that! I tried many different ways but they did not work, these are few of latest tries! but non has worked so far inside the progaurd-rules.pro I typed these
-keepclassmembers class android.R.drawable.* {*;} -keep class com.isseiaoki.simplecropview.* {*;} -keep class com.myprojectname.myname.R.* -keepdirectories libs/jdom-1.0.jar -keep libs/geonames-1.1.15.jar -keepdirectories <java.home>/libs/geonames-1.1.15.jar -dontshrink src/main/res/drawable
ALL I NEED TO DO IS TO EXCLUDE THESE FROM BEING SHRANK OR Obfuscation
Can anyone please help me by providing sample code? I do not get the syntax of all these very clearly