Unable to build to Android

When I try to build to android, the build succeeds… sort of. The build is created but if I build and run or try to install the app manually, I get the following error:

stderr[
Failed to install /Users/TheShadyColombian/Portfolio/Unity/Projects/1D/Temp/StagingArea/Package.apk: Failure [-26: Package com.JuanCallejas.OneDimension new target SDK 19 doesn't support runtime permissions but the old target SDK 23 does.]
]

However, installing via the standard installation GUI just says the package is corrupted.

Here is what the console errors are:

According to the error, I should try using a different version of the Android SDK (perhaps 23). The weird thing is that I’ve selected SDK 23 in the played build settings, and I’ve even deleted SDK 19, yet it still says I’m using SDK 19. I’ve verified that the SDKs I am using and/or deleting share the same directory path.

This is for an app I’ve already published, and needs an urgent update, so any help is very appreciated.

EDIT: It turns out I’ve actually just changed what API I’m using, not the SDK. How can I change the SDK to 23 or 25?

Ah and try to delete or move out every folder in Android\android-sdk\build-tools but one (the one with the highest version number). It should be somewhere in the same level like the path to the android sdk you put into your unity preferences.

I have detailed article about clean Unity/AndroidSDK installation which also solves this issue: http://devlog.markhlavac.com/2017/06/30/installing-android-sdk-for-unity3d-using-sdk-tools-and-cli/