Manifest merger failed : uses-sdk:minSdkVersion 18 cannot be smaller than version 24 declared in lib

衡翰藻
2023-12-01

Manifest merger failed : uses-sdk:minSdkVersion 18 cannot be smaller than version 24 declared in library [xxx] C:\Users\a.gradle\caches\transforms-1\files-1.1\xxx\0562430a754da47d1ed8f3d668be2648\AndroidManifest.xml as the library might be using APIs not available in 18
Suggestion: use a compatible library with a minSdk of at most 18,
or increase this project’s minSdk version to at least 24,
or use tools:overrideLibrary=“com.google.are.sceneform” to force usage (may lead to runtime failures)

libs导入一个jar后,出现版本不兼容报错

控制台其实有给出解决办法:
1:or increase this project’s minSdk version to at least 24 将此项目的 minSdk 版本增加到至少 24
2:强制使用(可能会导致运行时失败)

因为后期还会出现导入jar包出现版本不兼容的情况,这里选择用方法2去解决:

在程序AndroidManifest.xml清单下添加一行代码,xxx填写overrideLibrary对应的名称

<uses-sdk tools:overrideLibrary="xxx"/>

再编译,执行成功

 类似资料:

相关阅读

相关文章

相关问答