[英]How Do I Fix This Manifest Merger Issue?
I tried to run my Unscrambler application, but received an error about the MinSDK not being high enough for the project.我尝试运行我的 Unscrambler 应用程序,但收到有关 MinSDK 对项目来说不够高的错误。 This is the error that I received:
这是我收到的错误:
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)
My AndroidManifest.xml looks like this right now:我的 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>
Would this be a simple matter of raising the project's MinSDk or switching to a lower version library?提高项目的 MinSDk 或切换到较低版本的库是一件简单的事情吗?
Just use this there: tools:overrideLibrary="androidx.navigation.compose" It will fix your problem.只需在此处使用它: tools:overrideLibrary="androidx.navigation.compose" 它将解决您的问题。
Add or change in your
build.gradle
在您的
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"
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.