我创建了一个新的 Flutter 项目,这就是文件中 minSdkVersion 的样子app/build.gradle
:
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.projectname"
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
集合的价值在哪里flutter.minSdkVersion
?
请注意,以前,该配置值如下所示:
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"
}
另外,这是android/local.properties
文件的内容:
sdk.dir=/Users/usernaem/Library/Android/sdk
flutter.sdk=/Users/username/flutter
flutter.buildMode=release
flutter.versionName=1.0.0
flutter.versionCode=1
可以看到,flutter.minSdkVersion
这里没有设置 的值,但是项目可以编译构建成功。
flutter.minSdkVersion
和flutter.targetSdkVersion
变量在哪里初始化?