I have this error:
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ':flutter_libserialport'.
[CXX1110] Platform version 16 is unsupported by this NDK. Please change minSdk to at least 21 to avoid undefined behavior. To suppress this error, add android.ndk.suppressMinSdkVersionError=21 to the project's gradle.properties or set android.experimentalProperties["android.ndk.suppressMinSdkVersionError"]=21 in the Gradle build file.
Here is the build.gradle.kts
:
defaultConfig {
applicationId = "com.example.appli2"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
and local properties:
sdk.dir=C:\\Users\\xxx\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\SRC\\flutter
flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=1
I tried to change minSdk =21
, but no success.
I have this error:
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ':flutter_libserialport'.
[CXX1110] Platform version 16 is unsupported by this NDK. Please change minSdk to at least 21 to avoid undefined behavior. To suppress this error, add android.ndk.suppressMinSdkVersionError=21 to the project's gradle.properties or set android.experimentalProperties["android.ndk.suppressMinSdkVersionError"]=21 in the Gradle build file.
Here is the build.gradle.kts
:
defaultConfig {
applicationId = "com.example.appli2"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
and local properties:
sdk.dir=C:\\Users\\xxx\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\SRC\\flutter
flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=1
I tried to change minSdk =21
, but no success.
1 Answer
Reset to default 0I did this ... Works fine
.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
// new add
android.ndk.suppressMinSdkVersionError=21
Thanks
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745120092a4612362.html
评论列表(0条)