gpt4 book ai didi

android - 一个或多个插件需要更高的 Android SDK 版本

转载 作者:行者123 更新时间:2023-12-05 03:17:33 25 4
gpt4 key购买 nike

错误:一个或多个插件需要更高的 Android SDK 版本。通过将以下内容添加到 D:\Flutter Project\ivy\android\app\build.gradle 来修复此问题:安卓 {编译SDK版本33...

这是我的 app/build.gradle 代码

android {
compileSdkVersion 33
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.ivy"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

不是已经修复了吗?

最佳答案

compileSdkVersion 33
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

为什么要使用 compileSdkVersion 两次..?改成这个...

android {
compileSdkVersion 33
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

你用 flutter.compileSdkVersion 覆盖了 compileSdkVersion

关于android - 一个或多个插件需要更高的 Android SDK 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74120324/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com