簡體   English   中英

如何修復Android Studio 1.4上的錯誤“無法解決:…”

[英]How to fix error “Failed to resolve:…” on Android Studio 1.4

我無法在Gradle中添加存儲庫。

我一直在尋找這個問題的答案,但失敗了

應用中的Build.gradle文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.mkurbanov.lebap_kwartira"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.balysv:material-ripple:1.0.2'
compile 'com.yqritc:recyclerview-flexibledivider:1.4.0'
compile 'com.daimajia.easing:library:2.0@aar'
compile 'com.daimajia.androidanimations:library:2.3@aar'
compile 'com.github.esafirm.android-image-picker:imagepicker:x.y.z'
// for experimental rx picker
compile 'com.github.esafirm.android-image-picker:rximagepicker:x.y.z'
}

項目中的Build.gradle文件:

// Top-level build file where you can add configuration options common to 
 all sub-projects/modules.

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.3.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    jcenter()
    maven { url 'https://maven.google.com' }
    maven { url 'https://jitpack.io' }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

得到這樣的錯誤:

錯誤:(36,13)無法解決:com.github.esafirm.android-image- picker:rximagepicker:xyz在文件中顯示
在項目結構對話框中顯示

錯誤:(34,13)無法解決:com.github.esafirm.android-image- picker:imagepicker:xyz在文件中顯示
在項目結構對話框中顯示

我需要添加此存儲庫 但它不起作用。

在Build.gradle中,將xyz替換為1.13.1

更改compile 'com.github.esafirm.android-image-picker:imagepicker:xyz'compile 'com.github.esafirm.android-image-picker:imagepicker:1.13.1'

compile 'com.github.esafirm.android-image-picker:rximagepicker:xyz'

compile 'com.github.esafirm.android-image-picker:rximagepicker:1.13.1'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM