Don't forget to write the permissions without extra spaces in the manifest. In my case i had:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE " />
But look, at the end, there's an extra space. Just write it the right way
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
And it's working now