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.
ResourcesNotFoundException
Use of getIdentifier() function is discouraged. It is much more efficient to retrieve resources by identifier rather than by name.
getIdentifier()