错误:(41,13)无法解决:com.rarepebble:colorpicker:1.6.0

时间:2016-03-02 08:34:53

标签: android gradle android-gradle jitpack

  

错误:(41,13)无法解决:com.rarepebble:colorpicker:1.6.0和   错误:(42,13)无法解决:   com.vstechlab.easyfonts:easyfonts:1.0.0和错误:(40,13)失败   解决:petrov.kristiyan.colorpicker:colorpicker-library:1.0.3

gradle.build(模块:IIb)的

    apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
//apply from: '../.publishing/sonatype.gradle'

archivesBaseName = 'android-crop'
ext {
    PUBLISH_GROUP_ID = 'com.vstechlab'
    PUBLISH_ARTIFACT_ID = 'easyfonts'
    PUBLISH_VERSION = '1.0.0'
}

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.1'

    defaultConfig {
        minSdkVersion 10
        targetSdkVersion 22

        testApplicationId 'com.soundcloud.android.crop.test'
        testInstrumentationRunner 'android.test.InstrumentationTestRunner'
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile 'com.android.support:support-annotations:23.0.1'
    compile 'com.android.support:support-v4:23.0.1'
    androidTestCompile 'com.squareup:fest-android:1.0.7'
    androidTestCompile 'com.android.support:support-v4:23.0.1'
    androidTestCompile 'org.mockito:mockito-core:1.9.5'
    androidTestCompile 'com.google.dexmaker:dexmaker:1.0'
    androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.0'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'petrov.kristiyan.colorpicker:colorpicker-library:1.0.3'
    compile 'com.rarepebble:colorpicker:1.6.0'
    compile 'com.vstechlab.easyfonts:easyfonts:1.0.0'

}
apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'

模块示例

    apply plugin: 'com.android.application'

archivesBaseName = 'android-crop-example'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.1'

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 22
        versionCode Integer.parseInt(project.VERSION_CODE)
        versionName project.VERSION
        renderscriptTargetApi 19
        renderscriptSupportModeEnabled true
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {


    compile project(':lib')
    compile fileTree(dir: 'libs', include: ['*.jar'])


}

模块NC

 buildscript {
    repositories {
        mavenCentral()
        maven {
            url 'https://dl.bintray.com/vsvankhede/maven/'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
    }
}

allprojects {
    group = 'com.soundcloud.android'
    version = project.VERSION

    repositories {
        mavenCentral()
    }
}

设置gradle:

include ':lib', ':example'
我尝试运行项目时

错误

i  tried and got these all   seee.......

    >Error:A problem occurred configuring project ':example'.
> A problem occurred configuring project ':lib'.
   > Could not resolve all dependencies for configuration ':lib:_debugCompile'.
      > Could not find petrov.kristiyan.colorpicker:colorpicker-library:1.0.3.
        Searched in the following locations:
            https://repo1.maven.org/maven2/petrov/kristiyan/colorpicker/colorpicker-library/1.0.3/colorpicker-library-1.0.3.pom
            https://repo1.maven.org/maven2/petrov/kristiyan/colorpicker/colorpicker-library/1.0.3/colorpicker-library-1.0.3.jar
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/android/m2repository/petrov/kristiyan/colorpicker/colorpicker-library/1.0.3/colorpicker-library-1.0.3.pom
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/android/m2repository/petrov/kristiyan/colorpicker/colorpicker-library/1.0.3/colorpicker-library-1.0.3.jar
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/google/m2repository/petrov/kristiyan/colorpicker/colorpicker-library/1.0.3/colorpicker-library-1.0.3.pom
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/google/m2repository/petrov/kristiyan/colorpicker/colorpicker-library/1.0.3/colorpicker-library-1.0.3.jar
        Required by:
            com.soundcloud.android:lib:1.0.1
      > Could not find com.rarepebble:colorpicker:1.6.0.
        Searched in the following locations:
            https://repo1.maven.org/maven2/com/rarepebble/colorpicker/1.6.0/colorpicker-1.6.0.pom
            https://repo1.maven.org/maven2/com/rarepebble/colorpicker/1.6.0/colorpicker-1.6.0.jar
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/android/m2repository/com/rarepebble/colorpicker/1.6.0/colorpicker-1.6.0.pom
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/android/m2repository/com/rarepebble/colorpicker/1.6.0/colorpicker-1.6.0.jar
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/google/m2repository/com/rarepebble/colorpicker/1.6.0/colorpicker-1.6.0.pom
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/google/m2repository/com/rarepebble/colorpicker/1.6.0/colorpicker-1.6.0.jar
        Required by:
            com.soundcloud.android:lib:1.0.1
      > Could not find com.vstechlab.easyfonts:easyfonts:1.0.0.
        Searched in the following locations:
            https://repo1.maven.org/maven2/com/vstechlab/easyfonts/easyfonts/1.0.0/easyfonts-1.0.0.pom
            https://repo1.maven.org/maven2/com/vstechlab/easyfonts/easyfonts/1.0.0/easyfonts-1.0.0.jar
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/android/m2repository/com/vstechlab/easyfonts/easyfonts/1.0.0/easyfonts-1.0.0.pom
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/android/m2repository/com/vstechlab/easyfonts/easyfonts/1.0.0/easyfonts-1.0.0.jar
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/google/m2repository/com/vstechlab/easyfonts/easyfonts/1.0.0/easyfonts-1.0.0.pom
            file:/C:/Users/Altaf/AppData/Local/Android/sdk/extras/google/m2repository/com/vstechlab/easyfonts/easyfonts/1.0.0/easyfonts-1.0.0.jar
        Required by:
            com.soundcloud.android:lib:1.0.1

1 个答案:

答案 0 :(得分:2)

  

错误:(41,13)无法解决:com.rarepebble:colorpicker:1.6.0
       错误:(42,13)无法解决:com.vstechlab.easyfonts:easyfonts:1.0.0
       错误:(40,13)无法解决:petrov.kristiyan.colorpicker:colorpicker-library:1.0.3

这是因为这些库不在MavenCentral中

petrov.kristiyan.colorpicker:colorpicker-library:1.0.3.
com.vstechlab.easyfonts:easyfonts:1.0.0
com.rarepebble:colorpicker:1.6.0

检查以下链接: https://repo1.maven.org/maven2/petrov/kristiyan/colorpicker/colorpicker-library/1.0.3/colorpicker-library-1.0.3.pom

此链接不存在,它应该是使用上述库的Maven Central中的pom文件的链接。

可能你必须使用不同的maven回购 我无法在MavenCentral或Jcenter repo中找到它。

如果这些库在github上,您可以尝试使用jitpack

添加root/build.gradle:

allprojects {
        repositories { 
            jcenter()
            maven { url "https://jitpack.io" }
        }
   }

然后在你的项目中使用:

  dependencies {
        compile 'com.github.User:Repo:Tag'
   }