Android Question [Solved] AAB and "not be opened as a file descriptor" error

asales

Expert
Licensed User
Longtime User
My apps has mp3 files in DirAssets and works fine to load and play (using MediaPlayer).

Now I created a new app, that need to be in AAB format, and put in Play Store.
When I download the app and try to play the audio, I get this error:

audio_activity_create (java line: 418) java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed at android.content.res.AssetManager.openAssetFd(Native Method) at android.content.res.AssetManager.openFd(AssetManager.java:363) at anywheresoftware.b4a.objects.MediaPlayerWrapper.loadAfterReset(MediaPlayerWrapper.java:76) at anywheresoftware.b4a.objects.MediaPlayerWrapper.Load(MediaPlayerWrapper.java:66)

If I compile and test in APK format (that is not accept to the new apps in Play Store), it works.

What could be the problem (in AAB format) and how I can solve it?

Any support are welcome. Thanks.
 

asales

Expert
Licensed User
Longtime User
I found the answer in this link:
I got this problem because I removed the extension of the mp3 file and Android compress it. I put the extension in the name of the file and worked fine.
 
Upvote 1
Top