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
- Android studio Suggestion: use tools:overrideLibrary=”jp.wasabeef.blurry” to force usageAndroidIDE
- How To Use Google Logging Library (glog)Go
- database size increaseDatabase
- Increase Subarray Sums
- Project Server 2016 部署ProjectServer
- WARNING:Could not increase the asynch I/O limit to 164 for SQL direct I/OMITSQL
- 【Leetcode】1673. Find the Most Competitive SubsequenceLeetCode
- React 16.0+ 新特性初探(How to use)React
- Can't debug c++ project because unable to static library start program *.libC++Project
- Your project's analysis phase should yield three critical documents (轉)Project
- Speedup:專為專案下Library project過多所設計的加速外掛Project
- 2016 Top 10 Android LibraryAndroid
- [Most.js] Create Streams From Single Values With Most.jsJS
- sql version count引發cursor:pin s wait x及library cache latch library cache lockSQLAI
- Front Most Alfred WorkflowAlfred
- The most influential person
- library cache lock和cursor: pin S wait on X等待AI
- DB2 PL/SQL Example: bonus_increaseDB2SQL
- Oracle 的COMPATIBLE引數Oracle
- Traceback (most recent call last):AST
- H. The Most Reckless Defense
- Suggestion(搜尋建議)產品和技術
- 解決eclipse中android專案關聯android library project失敗問題EclipseAndroidProject
- 【轉載】Kano Model — Ways to use it and NOT use it
- 10月16日 CSP-S
- 魅族 16s電池續航怎麼樣?魅族 16s續航評測:魅族16s電池能用多久
- 11. Container With Most WaterAI
- Afterall most women on quite a few skillUI
- configure: error: PCRE2 library and headers are required, or use --with-pcre1 and PCRE >= 8.32 with UTF-8 supportErrorHeaderUI
- the "in" use in mysqlMySql
- nginx useNginx
- Project: OCFSProject
- OA projectProject
- oracle hint_use_concat_use_nl_with_indexOracleIndex
- PCRE Perl Compatible Regular Expressions LearningExpress
- jsp+tomcat+ 建立project 配置projectJSTomcatProject
- leetcode Container With Most WaterLeetCodeAI