在Android studio中引用第三方庫的時候,報這個錯。
Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found.
搜了一下。
"這是原因為該項目的原作者會把項目發布到maven中央倉庫中,所以在gradle中添加了相關的maven發布任務。
咱們又不能連到maven的倉庫,所以我們把你要導入的第三方build.gradle中"[1]無用的部分都刪掉。
按照作者的方法
刪掉除了
android{}
dependencies{}
之外的部分后還是不行,與pulltorefresh庫中的build.gradle對比了一下,
在最頂部保留
apply plugin: 'com.android.library'
rebuild一下,項目好用了!
[1] http://blog.csdn.net/cxzczxcxzc/article/details/48976843