如何解决此清单合并问题?

How do I fix this manifest merger issue?

我尝试 运行 我的 Unscrambler 应用程序,但我收到一个关于 MinSDK 对项目来说不够高的错误。这是我收到的错误:

Manifest merger failed : uses-sdk:minSdkVersion 19 cannot be smaller than version 21 declared in library [androidx.navigation:navigation-compose:1.0.0-alpha10] 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 21,
        or use tools:overrideLibrary="androidx.navigation.compose" to force usage (may lead to runtime failures)

我的 AndroidManifest.xml 文件现在看起来像这样:

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="androidx.navigation.compose" >

    <uses-sdk
        android:minSdkVersion="19"
        android:targetSdkVersion="30" />

</manifest>

是提升项目的MinSDK还是切换到低版本库这么简单的事情?

就用这个:

tools:overrideLibrary="androidx.navigation.compose"

它将解决您的问题。

Add or change in your build.gradle

dependencies {

    compile 'com.android.support:appcompat-v7:20.+'
    compile 'com.android.support:support-v4:20.+'
}

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"

    defaultConfig {
        applicationId "com.example.application"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
    }
}