File Access problem from asset pack in android from the testing app downloaded from Playstore?

1k views Asked by At

I have a question about the file accessing process from the asset folder of android which uses play asset delivery. I have done setup with the play asset delivery for deploying my android application as the size of the app is more than 150Mb.

I followed the google documentation for setting up the play asset delivery module - install_time_asset pack module and moved my asset files to the file structure given below: Below is the code structure I followed for accessing the files. enter image description here

Earlier I was not able to access the file in the install_time_asset_pack assets- install_time1.txt so I change the setting from edit configuration to run app from bundle instead of the APK. enter image description here

From this setting, I am able to access the asset folder files from both main assets and install pack assets.

Now I published the app to Google play console internal testing module for closed testing and downloaded the application from the play store application but during testing that application, I was not able to access the files from assets, what could be the possible reasons for that misbehavior?

1

There are 1 answers

0
rafi On BEST ANSWER

I found the answer to this question as I was optimizing the apk size I have added the minifyEnabled true which is causing the problem at runtime as it removes a few object classes to reduce the apk size.

After removing this flag, the downloaded apk is running fine now.