Minsdkversion 16 Cannot Be Smaller Than Version 21 Declared

admin_img Posted By Bajarangi soft , Posted On 06-11-2020

I notice that when creating a new flutter app the minSdkVersion is set to 16. minSdkVersion 16 cannot be smaller than version 21 declared in library in 16 Suggestion: use a compatible library with a minSdk of at most 16, Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library [com.google.android.gms:play-services:7.8.0] 0 Manifest merger failed : uses-sdk:minSdkVersion 7 cannot be smaller than version 14 declared in library

Minsdkversion 16 Cannot Be Smaller Than Version 21 Declared

Minsdkversion 16 Cannot Be Smaller Than Version 21 Declared 
Apply this Code
 
Adding this inside the application manifest should temporary fix the issue.


  <uses-sdk

  android:minSdkVersion="16"
  tools:overrideLibrary="com.calendarevents" />

This may cause some issues in the future if some functionality is added that is not supported on pre-KitKat devices.
I believe that the minSdkVersion should be bumped down, since it not seems to be related to any real limitations, or the reasoning (if any) behind the bump from 16 to 19 should be documented.


You also can add to android/app/build.gradle file next code:
 

ext {
    buildToolsVersion = "26.0.3"
    minSdkVersion = 19
    compileSdkVersion = 26
    targetSdkVersion = 26
    supportLibVersion = "26.1.0"
}

Adding the below line in config.xml file worked for me
<preference name="android-minSdkVersion" value="22" />

 

Related Post