Reputation: 1
I have this error
FAILURE: Build failed with an exception.
[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 { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "com.example.appli2" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. 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
Help wil be appriciated
I tried to change minSdk =21 , but no success
Upvotes: 0
Views: 26
Reputation: 1
I did this ... Works fine
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
// new add
android.ndk.suppressMinSdkVersionError=21
Thanks
Upvotes: 0