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.
- Get more help at https://help.gradle.org
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
Try upgrading
minSdkVersion
to 21. And also upgradetargetSdkVersion
to any versions above 30. Target sdk version 21 is too low for new versions .Upgrade your minSdkVersion 21 and targetSdkVersion 33
For most of flutter libraries target sdk requires 21 or more.