Audio not playing in android. android.content.res.Resources$NotFoundException: Resource ID #0x0

后端 未结 1 353
再見小時候
再見小時候 2021-01-27 06:49

I am trying to play an audio file in Android but it seems to crash and give a the ResourcesNotFoundException. The audio file is saved in the raw folder inside res.

相关标签:
1条回答
  • 2021-01-27 07:29

    Use of getIdentifier() function is discouraged. It is much more efficient to retrieve resources by identifier rather than by name.

    0 讨论(0)
提交回复
热议问题