I am able to play a local mp3 if I use the static method MediaPlayer.create(context, id) but it\'s not working if I use the non-static method MediaPlayer.setDataSource(Strin
You have to use setDataSource(@NonNull Context context, @NonNull Uri uri) instead of setDataSource(String path)
Since you want to resolve resource internal application resources, you have to provide Context which would be used to resolve this stuff
Also if you will take a look inside these two methods you will notice they use different strategies to find resulting resource.