Error:Execution failed for task ':pulltorefresh:processDebugAndroidTestManifest'.

来源:互联网 发布:淘宝呼死你哪里有卖 编辑:程序博客网 时间:2024/06/06 19:50

问题描述:在编译项目时报了标题的错误,这是导入的的pullToRefresh项目:
Error:Execution failed for task ':pulltorefresh:processDebugAndroidTestManifest'.> Manifest merger failed : uses-sdk:minSdkVersion 4 cannot be smaller than version 7 declared in library [com.android.support:recyclerview-v7:23.4.0] /Users/junan/.android/build-cache/d8759f1bc3a9193d67e751724c856b2f6d5d8cd2/output/AndroidManifest.xmlSuggestion: use tools:overrideLibrary="android.support.v7.recyclerview" to force usage


百度翻译过来的大概意思是: 错误:任务执行失败:pulltorefresh:processdebugandroidtestmanifest”。>体现并购失败:使用SDK的例子:minSdkVersion 4不能小于Version7在版本库里[ COM宣布。Android。支持:recyclerview-v7:23.4.0 ] 


RefreshListFragment中没有指明其编译的最低版本;因为它依赖了pullToRefresh_library库,所以它的miniSdkVersion不能小于库的版本,在build.gradle的


解决方法:在pullToRefresh的build.gradle中添加指定版本范围 defaultConfig:


android {    compileSdkVersion 22    buildToolsVersion '25.0.0'       defaultConfig {        minSdkVersion 16        targetSdkVersion 25    }  }


再次编译,问题解决。


阅读全文
4 0