Why Failed to open file error is happening in this line

Viewed 3959

Error : E/FileSource: Failed to open file 'android.resource:/com.android.grafika/2130968577'. (No such file or directory)

String vidAddress = "android.resource://"+getPackageName()+"/"+R.raw.b_right;
Uri vidUri = Uri.parse(vidAddress);
File sliders = new File(vidUri.toString());
Log.d("File",sliders.toString());

How to fix it? and what is the root cause? I mean what is wrong with this code snippet?

3 Answers
Related