I am trying to get String path directory to images in the res/drawable
Resources are not files on the device. They are entries in the APK's ZIP file. Hence, you cannot construct a File
that points to a resource.
You can use AssetManager
to list assets, open InputStreams
on assets, etc.