gpt4 book ai didi

Android Studio 3.4 list 合并失败 : uses-sdk:minSdkVersion 1 cannot be smaller than version 14

转载 作者:行者123 更新时间:2023-12-04 23:58:08 26 4
gpt4 key购买 nike

将Android Studio升级到3.4版本后我的项目同步报错:

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 14 declared in library [androidx.legacy:legacy-support-v4:1.0.0] C:\Users\pecana\.gradle\caches\transforms-2\files-2.1\0b6817155f227f1df719b12aa7dc1519\AndroidManifest.xml as the library might be using APIs not available in 1
Suggestion: use a compatible library with a minSdk of at most 1,
or increase this project's minSdk version to at least 14,
or use tools:overrideLibrary="androidx.legacy.v4" to force usage (may lead to runtime failures)

顺便说一句,我可以构建 APK 并正确运行应用程序(但只能在没有激活即时运行的情况下)。我试图添加

<uses-sdk tools:overrideLibrary="androidx.legacy.v4"/>

到主要的 AndroidManifest.xml 但错误仍然发生。知道如何解决这个问题吗?

谢谢

最佳答案

如错误提示,您还可以将项目的 minSdk 版本提高到 14 或更高版本。

转到您的 build.gradle(模块应用程序)文件并添加最低 SDK 版本,如下所示:

android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 14 or above here
}
}

关于Android Studio 3.4 list 合并失败 : uses-sdk:minSdkVersion 1 cannot be smaller than version 14,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56145744/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com