Execution failed for task ':app:processDebugMainManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 23 declared in library [:flutter_compass] A:\Project source\compass_app - prot2\build\flutter_compass\intermediates\merged_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 19 Suggestion: use a compatible library with a minSdk of at most 19, or increase this project's minSdk version to at least 23, or use tools:overrideLibrary="com.hemanthraj.fluttercompass" 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.
Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)
CodePudding user response:
The error message tells you that there is a library which requires a higher SDK version (at least 23) than is currently configured as the minimum (19). The compiler recognizes this as an error, because your app would then probably not work on older devices.
If you would like to continue using this library, you will have to increase the minSDKVersion
to at least 23. This can be done by editing the android/app/build.gradle
file.
Inside this file, find the line stating minSDKVersion 19
and replace it with minSDKVersion 23
.
This is also described in this question
CodePudding user response:
This error generally occurs when a package you use has a higher Minimum SDK version (the lowest version your app can support) and when you declare your app's minimum SDK version below than that declared in the package.
You can solve this using two methods:
Method 1
- Navigate to
yourProjectRoot\android\app\build.gradle
and then changeminSdkVersion 19
tominSdkVersion 23
. - You can find the
minSdkVersion
in
def localProperties = new Properties()
//Other configs here........
android {
//Other properties configured
defaultConfig {
applicationId "com.example.myapp"
minSdkVersion 23 //**Make the change Here**
//Other SDK properties....
}
}
//Other code...........
Method 2
- Not really a solution but you can try finding another package at pub.dev which meets your need and has a minSDK version to 19