uses-sdk tools:overrideLibrary uses-sdk:minSdkVersion 1 cannot be smaller than version 9
2017-05-03 17:51
916 查看
android studio 使用第三方库合并出现minSdkVersion 问题问题一:Error:Execution failed for task ':app:processDebugManifest'.> Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 21declared in library [gr.escsoft.michaelprimez.revealedittext:RevealEditText:1.0.1] C:\Users\Administrator\.android\build-cache\d5a100f0a9d8dc264876d9eb481e72ab39cc7f96\output\AndroidManifest.xmlSuggestion: use tools:overrideLibrary="gr.escsoft.michaelprimez.revealedittext" to force usage解决方法:在库或者主app中的AndroidManifest.xml下边
application的外部上边追加一句话
<uses-sdk xmlns:tools="http://schemas.android.com/tools" tools:overrideLibrary="gr.escsoft.michaelprimez.revealedittext"/>这样就能编译通过,但是!!!!!!
没经过测验,个人觉得最好不要这样做,容易导致版本不兼容问题,例如库lib兼容到21,而目前最低14主app中,如果用户手机版本低于5.0版本,例如4.x版本,
有可能不兼容,
而出现能安装上app,但是使用到了具体lib中的功能时,出现崩溃问题,所以,还是选择兼容的app库再使用
问题二:
Error:Execution failed for task ':library:processDebugAndroidTestManifest'. > Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 9 declared in library [com.android.support:appcompat-v7:25.3.1] C:\Users\Administrator\.android\build-cache\d3a75efec7269e1cd4cfddcc4a1fb98086bc9fad\output\AndroidManifest.xml Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage
这个解决方法:很简单,像
AndroidManifest.xml下边
application的外部上边追加一句话
<uses-sdk android:minSdkVersion="9"/>或者
gradle下边增加:( 根据自己的需求,配置红色部分)
android { compileSdkVersion 25 buildToolsVersion = '25.0.0' defaultConfig { minSdkVersion 14 targetSdkVersion 25 versionCode 21 versionName "3.2.4" } }
相关文章推荐
- Android Studio常见问题 -- uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library
- Android -- uses-sdk:minSdkVersion 10 cannot be smaller than version L declared in library com.android.support:appcompat-v7:21.0.0-rc1
- 关于Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in lib
- Android Studio 中Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 7
- Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 10 declared in library
- Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 21 declared in li
- uses-sdk:minSdkVersion 11 cannot be smaller than version 14 declared in library
- uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library
- 关于Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 16 declared in lib
- Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared
- Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version
- Android Studio报错:Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version
- Android Studio常见问题--uses-sdk:minSdkVersion 11 cannot be smaller than version 15 declared in library
- uses-sdk:minSdkVersion 14 cannot be smaller than version 21 declared in library
- Android Studio常见问题 -- uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library
- Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 7
- 解决 Android Studio : minSdkVersion 8 cannot be smaller than version L
- 解决 Android Studio : minSdkVersion 8 cannot be smaller than version L
- Android Studio编译报错:sdk:minSdkVersion 1 cannot be smaller than version 7 declared in library
- Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be sma