Call requires API level 21, current min is 8. Even though I set my min SDK to 21, it still shows this error.
<uses-sdk android:minSdkVersion="21"
android:targetSdkVersion="23"
android:maxSdkVersion="23" />
The sdk version values in the Manifest.xml will be overridden by the values in the build.gradle file.
Please change the code in your build.gradle file to this.
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 22
Look for your project properties file. This may be in your root folder, called project .properties. Try adding this line, you should have it in any case:
target=android-23
"Calls requires API level 21.(current mint is 15)"...
I solved this error by simply
set-> compileSdkVersion 27 minSdkVersion 15 TargetSdkVersion 27
After setting these attributes, I simply go main activity where I face a problem.
I just click on my error and from suggestions I choose Add @TargetApi(LOLLIPOP) Annotation and through this process, I solved my issue..
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.