Suggestion: use a compatible library with a minSdk of at most 16, or increase this project's minSdk
今天在整合三方SDK是出現**Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:device_sdk-release:]**詳細資訊如下:
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:device_sdk-release:] C:\Users\geo\.gradle\caches\transforms-1\files-1.1\device_sdk-release.aar\e529280690e69043be9b8f9fc1e329c8\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="xxx" to force usage (may lead to runtime failures)
原因
造成這種問題的原因是自己專案的minSdkVersion
比三方SDK的的minSdkVersion
低,即版本不一致導致的。
解決辦法
其實在上面的日誌中也給出了這種問題的三種解決方案:
Suggestion: use a compatible library with a minSdk of at most 16
:將三方庫的minSdkVersion
降低,這種方案一般是不可行,我們自己無法修改對方的SDK的minSdkVersion。increase this project's minSdk version to at least 19
:提高自己專案的minSdkVersion大於等於三方的即可。use tools:overrideLibrary="com.android.device.geo.device_sdk" to force usage
:在AndroidMainifest.xml中加入下面加上:
<uses-sdk tools:overrideLibrary="三方庫的包名"/>
即可。
相關文章
- 關於Android SDK裡的compileSdk、minSdk、targetSdk、buildTools、Tools、Platform-toolsAndroidCompileUIPlatform
- ORA-65294: PDB's compatible parameter value (12.2.0.1.0) is higher than CDB's
- Increase Subarray Sums
- Can't debug c++ project because unable to static library start program *.libC++Project
- How to use “cat” command on “find” command's output?
- COMPATIBLE引數
- The most influential person
- [Most.js] Create Streams From Single Values With Most.jsJS
- WT2003S-16S播放音樂控制
- configure: error: PCRE2 library and headers are required, or use --with-pcre1 and PCRE >= 8.32 with UTF-8 supportErrorHeaderUI
- 魅族 16s電池續航怎麼樣?魅族 16s續航評測:魅族16s電池能用多久
- 10月16日 CSP-S
- 搜尋欄獲取百度suggestion
- Leetcode 11 Container With Most WaterLeetCodeAI
- H. The Most Reckless Defense
- Traceback (most recent call last):AST
- How to Increase CSS Misscount in single instance ASM installations [ID 729878.1]CSSASM
- 某個 TranslatorInterface::setLocale ($locale) not compatible
- 【轉載】Kano Model — Ways to use it and NOT use it
- LeetCode 11. Container With Most WaterLeetCodeAI
- 508-Most Frequent Subtree Sum
- leetcode_11. Container With Most WaterLeetCodeAI
- 【Lintcode】1484. The Most Frequent Word
- nginx useNginx
- 【Leetcode】1673. Find the Most Competitive SubsequenceLeetCode
- LeetCode - Medium - 11. Container With Most WaterLeetCodeAI
- JEP解讀與嚐鮮系列4 - Java 16 中對於 Project Valhalla 的鋪墊JavaProject
- library cache pin和library cache lock(一)
- library cache pin和library cache lock (zt)
- library cache pin和library cache lock(二)
- boost library
- 魅族16S安兔兔跑分多少?搭載驍龍855的魅族16S跑分效能測試
- The Buffalo Bills may be the third most popular team in their nation
- LeetCode Container With Most Water(011)解法總結LeetCodeAI
- [LeetCode] 2070. Most Beautiful Item for Each QueryLeetCode
- Be better to use NPMNPM
- WireGuard Use Notes
- plsql use skillsSQL