cunarist / rinf

Rust for native business logic, Flutter for flexible and beautiful GUI
MIT License
1.82k stars 64 forks source link

[CXX1110] Platform version 16 is unsupported by this NDK. #355

Closed debanjanbasu closed 2 months ago

debanjanbasu commented 2 months ago

Report

[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. Affected Modules: rinf

image

I've got both the latest stable version of SDK-34, and NDK 26.3.x, and 26.1.x

Steps to Reproduce

Following is the config file for my build.gradle

plugins {
    id "com.android.application"
    id "kotlin-android"
    // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
    id "dev.flutter.flutter-gradle-plugin"
}

// SDK Version 34 is the latest as of now, till Flutter upgrades
def sdkVersion = Math.max(flutter.minSdkVersion, 34).toInteger()

android {
    namespace = "com.quanti.spareshare"
    compileSdk = sdkVersion
    ndkVersion = "26.3.11579264"

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_1_8
    }

    defaultConfig {
        // Enable multidex
        multiDexEnabled true
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId = "com.quanti.spareshare"
        // You can update the following values to match your application needs.
        // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
        minSdk = 21
        targetSdk = sdkVersion
        versionCode = flutter.versionCode
        versionName = flutter.versionName
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig = signingConfigs.debug
        }
    }
}

flutter {
    source = "../.."
}

dependencies {
    implementation "androidx.security:security-crypto:1.1.0-alpha06"
}

System Information

Unable to run on Android. Testing with all the current stable SDK, and NDKs.

rustc --version
flutter doctor
temeddix commented 2 months ago

Closing issue from #356, please let me know if there are any side-effects

debanjanbasu commented 2 months ago

Thanks mate, this should do the job for now 👍. Appreciate the updates elsewhere as well.