minSdkVersion

Posted pythonclub

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了minSdkVersion相关的知识,希望对你有一定的参考价值。

10
 

It is indeed possible to increase minSdkVersion, but it took me way too much time to find it out because google searches mostly yields as result discussions about the absolute minimum Sdk version flutter should be able to support, not how to increase it in your own project.

Like in an android Studio project, you have to edit the build.gradlefile. In a flutter project, it is found at the path ./android/app/build.gradle.

The parameter that needs to be changed is, of course, minSdkVersion 16, bumping it up to what you need (in this case 19).

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.projectname"
    minSdkVersion 19 //*** This is the part that needs to be changed, previously was 16
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Seems obvious now, but took me long enough to figure it out on my own.

 

 

 

You can change the minSdkVersion in Project_Name/android/app/build.gradle , defaultconfig :

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.projectname"
    minSdkVersion 16 // <--- There
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
shareimprove this answer
 
https://stackoverflow.com/questions/52060516/how-to-change-android-minsdkversion-in-flutter-project

以上是关于minSdkVersion的主要内容,如果未能解决你的问题,请参考以下文章

compileSdkVersion, minSdkVersion 和 targetSdkVersion

compileSdkVersion, minSdkVersion 和 targetSdkVersion

compileSdkVersion, minSdkVersion 和 targetSdkVersion

v3 mini 控制器的向后兼容性:错误膨胀类片段

minsdkversion 的小版本?我该如何解决?

uses-sdk:minSdkVersion 16 不能小于库中声明的版本 23