解决办法: Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found.

在Android studio中引用第三方库的时候,报这个错。

Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found.

搜了一下。

这是原因为该项目的原作者会把项目发布到maven中央仓库中,所以在gradle中添加了相关的maven发布任务。

咱们又不能连到maven的仓库,所以我们把你要导入的第三方build.gradle中。

 

按照作者的方法

删掉除了

android{}
dependencies{}

之外的部分后还是不行,与pulltorefresh库中的build.gradle对比了一下,

在最顶部保留

apply plugin: 'com.android.library'

然后点击下面下载对应的版本,然后删掉第三方库中关于干javajdk版本号的两行即可。



猜你喜欢

转载自blog.csdn.net/qq_26554909/article/details/72852580