我正在尝试在 gradle 中添加第三方库。它显示以下错误:

android - 无法解析android studio中的库-LMLPHP

这是我的 gradle 文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"
    compileOptions.encoding = 'ISO-8859-1'
    defaultConfig {
        applicationId "com.attendme.io"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.4" //1.4.1
        //multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile files('libs/kandy-1.6.160.jar')
    compile files('libs/gcm.jar')
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.android.support:recyclerview-v7:23.3.0'
    //compile 'com.google.android.gms:play-services-gcm:8.4.0'
    //compile 'com.google.android.gms:play-services-maps:8.4.0'
    compile 'com.squareup.okhttp3:okhttp:3.2.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.google.android.gms:play-services:8.4.0'
    compile 'com.github.ParkSangGwon:TedPicker:v1.0.10'


}

当我搜索这个问题时,我找到了一些解决方案,但它们对我不起作用。我该如何解决这个问题?

最佳答案

您需要添加 2 个 maven 存储库。

所以确保你的 build.gradle(Project) 包含这个

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

这在你的 build.gradle(app) 中
compile 'com.github.ParkSangGwon:TedPicker:v1.0.10'

10-07 19:25
查看更多