Sau khi nâng cấp lên API 22 và hỗ trợ sửa đổi lib 22 Tôi nhận được cảnh báo sau:
Cảnh báo: Xung đột với sự phụ thuộc 'com.android.support:support-annotations'. Các phiên bản đã giải quyết cho ứng dụng (22.0.0) và ứng dụng thử nghiệm (21.0.3) khác nhau.
Bản thân Gradle dễ tha thứ hơn, nhưng Android Studio, không quá nhiều.
Tôi không có phụ thuộc được khai báo với 21.0.3 ... là một trong những thư viện phụ thuộc sử dụng 21.0.3 và Google quên cập nhật nó với phần còn lại của lô?
Của tôi build.gradlevới các tính năng bổ sung
android {
  compileSdkVersion 22
  buildToolsVersion '22'
  defaultConfig {
    applicationId "com.REDACTED.android"
    minSdkVersion 14
    targetSdkVersion 22
    renderscriptSupportModeEnabled true
    versionName '1.0.0'
    versionCode 100
  }
  buildTypes {
    release {
      minifyEnabled true
      zipAlignEnabled true
      signingConfig signingConfigs.release
    }
    debug {
      minifyEnabled false
      zipAlignEnabled true
      signingConfig signingConfigs.debug
    }
  }
  dependencies {
    provided 'org.projectlombok:lombok:1.16.2'
    googleCompile 'com.google.android.gms:play-services-base:6.5.87'
    compile 'com.android.support:support-v4:22.0.0'
    compile 'com.android.support:appcompat-v7:22.0.0'
    compile 'com.android.support:support-v13:22.0.0'
    compile 'com.android.support:cardview-v7:22.0.0'
    compile 'com.android.support:palette-v7:22.0.0'
    compile 'com.android.support:support-annotations:22.0.0'
    compile 'com.github.chrisbanes.photoview:library:1.2.3'
    compile 'org.apache.commons:commons-lang3:3.3.2'
    compile 'commons-io:commons-io:2.4'
    compile 'commons-codec:commons-codec:1.10'
    compile 'com.jakewharton:butterknife:6.1.0'
    compile 'com.jakewharton:disklrucache:2.0.2'
    compile 'com.squareup:otto:1.3.6'
    compile 'com.squareup.picasso:picasso:2.5.0'
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    compile 'com.squareup.okhttp:okhttp:2.2.0'
    compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
    compile 'com.squareup.okio:okio:1.2.0'
    compile 'com.flaviofaria:kenburnsview:1.0.6'
    compile 'com.edmodo:cropper:1.0.1'
    compile 'com.getbase:floatingactionbutton:1.8.0'
    compile 'com.nispok:snackbar:2.10.2'
    compile 'com.github.ksoichiro:android-observablescrollview:1.5.0'
    compile 'in.srain.cube:grid-view-with-header-footer:1.0.9'
    compile 'de.hdodenhof:circleimageview:1.2.2'
    compile fileTree(dir: 'libs', include: '*.jar')
    // Test Only Dependencies
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'
    androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
    androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.0'
  }
Cập nhật: (Cảm ơn Mark)
Hình như đó là espresso-contrib
+--- com.android.support.test:testing-support-lib:0.1 (*)
\--- com.android.support.test.espresso:espresso-contrib:2.0
     +--- com.android.support:recyclerview-v7:21.0.3
     |    +--- com.android.support:support-annotations:21.0.3
     |    \--- com.android.support:support-v4:21.0.3
     |         \--- com.android.support:support-annotations:21.0.3
     +--- com.android.support:support-v4:21.0.3 (*)
     \--- com.android.support.test.espresso:espresso-core:2.0 (*)
          espresso-contriblà nguyên nhân ...
                excludechặn phiên bản 21.0.3 recyclerview-v7, tự mình kéo phiên bản 22.0.0 và cầu nguyện rằng chúng đủ tương thích với espresso-contribnhu cầu của họ. Cá nhân tôi rất ngạc nhiên khi bạn duy trì sự tỉnh táo của mình với danh sách phụ thuộc dài đó ... :-)
                
dependenciesNhiệm vụ Gradle có thể giúp bạn xác định thủ phạm: gradle.org/docs/civerse/userguide/ Kẻ