This is better on my website www.distantworld.com/minimumapi.html.
If like me you used a method only supported by a higher API level than your currently set API – this is the way you fix it.
First go to AndroidManifest and add something like below (set it to your desired API’s)
Second if that does not work after cleaning and rebuilding your project find the build.gradle file for your project. If you open it in Notepad you will see somewhere your API settings. Just change the text to your API version.