[英]Are "flutter.targetSdkVersion", "flutter.compileSdkVersion" and "flutter.minSdkVersion" configurable?
[英]Flutter minSdkVersion and targetSdkVersion error
在舊版本中,我們可以通過 android/app/build.gradle 進行更改。 現在,當我們更改它時它會出錯。
defaultConfig {
applicationId "com.example.manuel"
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
有些人通過 local.properties 解決了這個問題,但是這種方法也不起作用。
sdk.dir=C:/Users/user/AppData/Local/Android/Sdk
flutter.sdk=C:\\src\\flutter
flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=1
您還需要在新版本中編輯build.gradle
文件。 如下;
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.manuel"
minSdkVersion 16 // <--- There minSdkVersion Content
targetSdkVersion 27 <--- There targetSdkVersion (is actually Max Sdk Version) Content
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
然后重建項目並再次構建它。
我希望這會有用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.