How to fix Plugin with id 'com.github.dcendents.android-maven' not found. in android studio

I am creating an android application in android studio. I am adding a library to my project which was downloaded fromhere. When i was adding this library to my project it was showing an error called"Error:(2, 0) Plugin with id 'com.github.dcendents.android-maven' not found.". Please tell me how to fix it.???

问题描述:

I use the following library to add material design to my android project

https://github.com/navasmdc/MaterialDesignLibrary

But after importing it as a module, I get the following error. How can I fix it

Error:(2,0)Pluginwithid'com.github.dcendents.android-maven'notfound.

解决方法:

First of all you can use this library as dependency simply adding to yourmodule/build.gradlethis dependency:

dependencies{compile'com.github.navasmdc:MaterialDesign:1.5@aar'}

If you want to import locally as module, you have to add this part in yourmodule/build.gradle: (this part is added inthe top-level filein the library)

buildscript{

      repositories{

                   jcenter()

      }

      dependencies{

           classpath'com.android.tools.build:gradle:1.+'

           classpath'org.codehaus.groovy:groovy-backports-compat23:2.3.5'

           classpath'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'classpath'com.github.dcendents:android-maven-plugin:1.2'

}

}

Pay attention that this library is not updated with the last support libraries, and doesn't use the new design support library.

Add these lines in project.gradle dependencies:

classpath'com.github.dcendents:android-maven-gradle-plugin:1.3'

classpath'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容