I'm adding a function in the application that I'm developing in android studio, which makes direct calls from the app, but this error is asking for some kind of permission, and I've already added permission on my AndroidManifest.
Add this to your import:
import android.annotation.TargetApi;
String[] perms = {"android.permission.WRITE_EXTERNAL_STORAGE"};
ActivityCompat.requestPermissions(MainActivity.this,perms,permsRequestCode);
and enough.