skip to Main Content

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:wmsflutterwarehouse_management_systembuildfirebase_databaseintermediatesmerged_manifestdebugAndroidManifest.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 !

2

Answers


  1. 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
    
    Login or Signup to reply.
  2. Upgrade your minSdkVersion 21 and targetSdkVersion 33
    For most of flutter libraries target sdk requires 21 or more.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search