Home > Blockchain >  The plugin firebase_database requires a higher Android SDK version
The plugin firebase_database requires a higher Android SDK version

Time:12-06

I got this error when i connect my flutter app with firebase rtdb

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:processDebugMainManifest'.

Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:firebase_database] C:\wmsflutter\warehouse_management_system\build\firebase_database\intermediates\merged_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16 Suggestion: use a compatible library with a minSdk of at most 16, or increase this project's minSdk version to at least 19, or use tools:overrideLibrary="io.flutter.plugins.firebase.database" to force usage (may lead to runtime failures)

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

But the problem is thatmy minsdk version is already 19 , i changed it in build.gradle script.

**compileSdkVersion 21

defaultConfig {

    minSdkVersion 19
    targetSdkVersion 21
}

compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

**

Do you have any idea for this issue ?

Thanks in advance !

CodePudding user response:

Try upgrading minSdkVersion to 21. And also upgrade targetSdkVersion to any versions above 30. Target sdk version 21 is too low for new versions .

minSdkVersion 21
targetSdkVersion 30

CodePudding user response:

Upgrade your minSdkVersion 21 and targetSdkVersion 33 For most of flutter libraries target sdk requires 21 or more.

  • Related