0

I get the following error:

Launching lib\main.dart on Lenovo K10a40 in debug mode...
lib\main.dart:1
C:\Users\user\Desktop\chatflutter\android\app\src\debug\AndroidManifest.xml Error:
    uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [com.google.firebase:firebase-analytics:21.1.1] C:\Users\user\.gradle\caches\transforms-3\06c7fe4f2370f2607dc0a1e2da67849f\transformed\jetified-firebase-analytics-21.1.1\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="com.google.firebase.firebase_analytics" to force usage (may lead to runtime failures)

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 [com.google.firebase:firebase-analytics:21.1.1] C:\Users\user\.gradle\caches\transforms-3\06c7fe4f2370f2607dc0a1e2da67849f\transformed\jetified-firebase-analytics-21.1.1\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="com.google.firebase.firebase_analytics" 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

BUILD FAILED in 31s
Exception: Gradle task assembleDebug failed with exit code 1

How to fix the above error?

1 Answer 1

1

change the minimun sdk version in /android/app/build.gradle

minSdkVersion 19
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.