I also got the same exception, but went through it just by granting storage permission to the application from:
Settings> Applications> {My application}> Permissions> Enable storage
The above part can also be done through Java code, I found out about this in the Android Marshmallow tutorial. Also, be sure to declare the permission for INTERNET and READ_EXTERNAL_STORAGE in the Android manifest file. However, if you still get an exception, try updating your playback services as well.
source share