Sound files do not work in my app

Hello , It works flawlessly while testing my application, but when I get the apk of my application, I get the error “Unable to load sound.mp3.”.

There is my blocks. I made a same app with same blocks. The other app is working fine but this app isn’t.


2

Have you upload your sound files correctly to the assets?

yes , I upload them to player component.

Can you share the aia file (I prefer this) or the APK?

I sent you a message.

You don’t have your audio files on the app assets

how can I add them? I uploaded them player component.

Go to assets, next to the designer button, and upload all the files.

I did it and publish it on google play but still I am taking the same error. When I download the apk from kodular to my phone it is working but when I download it from google play it gave the error.

Connect to Companion, right mouse click on this block:

blocks

See also here (→ point 4):

Did you publish the app as an APK or an Android App Bundle (.aab)?

As an .aab

See here, it’s a bug:

1 Like

Yes, then your problem is probably related to this:

You can try to use the ExoPlayer instead of the Player component.

2 Likes

but i think player will work fine major issue is due to aab bug and exoplayer also have some bug exo player plays song but their is no sound if he want to try with another player then should try taifun player its working and i dont think its needed

This only applies if audio files are to be played from the removeable SD card. That is not the case here. However, the ExoPlayer has problems in idle (sleep) mode with certain devices.

The TaifunPlayer is based on the Android MediaPlayer (i.e. the Player component) and has only one special feature, namely for gapless looping.

So I wouldn’t bet that the same problem won’t occur with the TaifunPlayer.

1 Like

yes problem wont be solved using Player component / Exoplayer / Taifun Player as its due to aab bug

and

thanks for correcting me as i used Exoplayer and Taifun player in an music player project so i told that i was not aware that Exoplayer plays assets mp3 file correctly.

thanks again

Hi
I got the same problem as an error

As a solution:
1 - Use Explayer component
2 - upload sounds to assets in .ogg format

It was a workaround for me, it should be in you

Good luck

What does that mean? Do you get the same error with ExoPlayer if the audio files are stored as MP3 files in the assets, but not when using OGG format?
That would be really strange.

I can use exoplayer but I have too many sounds. If I try to change them into .ogg format that would take my whole life :worried: What can I do except using .ogg?