Irf*_*fan 5 android target-sdk
我将 Target SDK Version 从 30 更改为 31,Min SDK Version 从 19 更改为 22。在 build.gradle 中,minSdkVersion、targetSdkVersion 和 targetSdk 相应更改,除了 minSdk 之外。现在还是19岁。
android {
compileSdk 31
defaultConfig {
applicationId "com.example.studentsacademicmanagementappsama"
minSdk 19
targetSdk 31
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
targetSdkVersion 31
minSdkVersion 22
}
}
Run Code Online (Sandbox Code Playgroud)
minSdkVersion、targetSdkVersion和minSdk、targetSdk有什么区别?
我应该将 minSdk 更改为 22 还是忽略它?
小智 -1
build.gradle 中没有名为 minSdk 、 targetSdk 和compileSdk 的东西。你应该像这样配置你的应用程序兼容性:
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.app.test"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0.0"
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1949 次 |
| 最近记录: |