Error: plugin with id 'com.github.dcendents.android-maven' not found

I use this library in my android application. ( https://github.com/yazeed44/MultiImagePicker )

So far, I have added it to my project as follows:

compile 'net.yazeed44.imagepicker:imagepicker:1.3.0' 

The import problem of this method, as far as I know, cannot override any code, because after creating the project I will lose all the possibilities. (I need to change the code)

For this reason, I downloaded the source code and I imported the project as a module with this name: 'imagepicker'

After that, I added this line to my build.gradle application:

 compile project(':imagepicker') 

and this is for my .gradle settings (Android Studio did it)

 include ':app', ':imagepicker' 

After that, I try to start the project, and Android studio shows this error:

 Gradle 'Project' project refresh failed Error:Plugin with id 'com.github.dcendents.android-maven' not found. 

I do not know what to do. thanks in advance

+6
source share
2 answers

Since you use the module locally , you must add the same config added to the imagepicker build.gradle project to your top level build.gradle or to imagepicker/build.gradle .

 buildscript { repositories { jcenter() } dependencies { //ADD THESE DEPENDENCIES classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' } } 

An alternative would be to modify imagepicker/build.gradle remove the last two lines. But you have to test this way.

 apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle' apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle' 

If you check these files, you will find

 apply plugin: 'com.github.dcendents.android-maven' 

In your case, you do not need these files because they are only useful for uplaod in the maven repo aar file.

+7
source

I added the code below in the Project: gradle.build file and its problem has been resolved:

 allprojects { repositories { jcenter() maven { url "https://repo.commonsware.com.s3.amazonaws.com" } } } 

EDIT

If you are still faced with adding the maven dependencies above Change the url "https://repo.commonsware.com.s3.amazonaws.com" to the url "https://s3.amazonaws.com/repo.commonsware.com" .

+6
source

All Articles