由于com.android.support:support-vector-drawable:26.0.2而导致Andriod Build失败取决于一个或多个Android库

时间:2018-06-08 16:30:29

标签: android gradle

在我的CI管道中直到6月6日才有效。今天它失败了。发生以下构建错误。

警告:模块' com.android.support:support-vector-drawable:26.0.2'取决于一个或多个Android库,但它是一个罐子

FAILURE: Build failed with an exception.

  * What went wrong:
 A problem occurred configuring project ':app'.
 > Could not find support-vector-drawable.jar (com.android.support:support- 
vector-drawable:26.0.2).
Searched in the following locations:
  https://jcenter.bintray.com/com/android/support/support-vector- 
drawable/26.0.2/support-vector-drawable-26.0.2.jar



   Build.Gradle file

    buildscript {
repositories {
    jcenter()
    mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.3.3'
    classpath "io.realm:realm-gradle-plugin:3.1.4"
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    classpath 'com.newrelic.agent.android:agent-gradle-plugin:5.+'
    classpath 'com.google.gms:google-services:3.1.0'
    classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE"
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
     }
   allprojects {
   repositories {
    jcenter()
    maven { url 'https://mobile-sdk.jumio.com' }
    maven {
        url "https://maven.google.com/" // Google's Maven repository
    }
    maven {
        url  "http://kochava.bintray.com/maven"
        }
      }
    }

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



       App level 

    apply plugin: 'com.android.application'
    apply plugin: 'realm-android'
    apply plugin: 'newrelic'
     apply plugin: "io.spring.dependency-management"

   android {
 compileSdkVersion 26
 buildToolsVersion '26.0.2'
configurations.all {
    resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
defaultConfig {
    applicationId "com.seven.eleven.phoenix"
    minSdkVersion 19
    targetSdkVersion 26
    versionCode 16
    versionName "1.1.1_1_QA"
    multiDexEnabled true
    testInstrumentationRunner 
 "android.support.test.runner.AndroidJUnitRunner"
    renderscriptTargetApi 21
    renderscriptSupportModeEnabled true
}
buildTypes {
    release {
        debuggable false
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
   'proguard-rules.pro'
    }

    debug {
        debuggable true
        minifyEnabled false
        shrinkResources false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
  'proguard-rules.pro'
    }
}

dexOptions {
    incremental true
    javaMaxHeapSize "4g"
}


packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
}
  sourceSets { main { assets.srcDirs = ['src/main/assets', 
     'src/main/assets/fonts'] } }

def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

buildTypes.each {
    it.buildConfigField 'String', 'STRIPE_APIKEY', 
   keystoreProperties['StripeKey']
    it.buildConfigField 'String', 'PHOENIX_API_KEY', 
   keystoreProperties['PhoenixAPIKey']
    it.buildConfigField 'String', 'NEW_RELIC_KEY', 
    keystoreProperties['NewRelicKey']
    it.buildConfigField 'String', 'OPEN_WEATHER_API_KEY', 
    keystoreProperties['OpenWeatherAPIKey']
    it.buildConfigField 'int', 'WORKING_BRANCH', getCurrentGitBranch()

           }
      }

      def getCurrentGitBranch() {
  def gitBranch = "Unknown branch"
   try {
    def workingDir = new File("${project.projectDir}")
    def result = 'git rev-parse --abbrev-ref HEAD'.execute(null, workingDir)
    result.waitFor()
    if (result.exitValue() == 0) {
        gitBranch = result.text.trim()
    }
  } catch (e) {
   }

   if(gitBranch.contains('master')||gitBranch.contains('PROD') || 
    gitBranch.contains('7XXX_Master')){
    return "1";
} else {
    return "0";
}
 }

  ext {
SDK_VERSION = "2.10.0"
ANDROID_VERSION = "26.0.2"
       }

  repositories {

     mavenCentral()
     }

  dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', 
  {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.squareup.retrofit2:retrofit:2.3.0')
        {
            exclude group: 'com.squareup.okhttp3', module: 'okhttp'
        }
compile('com.squareup.retrofit2:converter-gson:2.3.0')
        {
            exclude group: 'com.squareup.okhttp3', module: 'okhttp'
        }
compile group: 'de.mindpipe.android', name: 'android-logging-log4j', 
version: '1.0.3'
compile group: 'log4j', name: 'log4j', version: '1.2.17'

compile "com.android.support:cardview-v7:${ANDROID_VERSION}@aar"
compile "com.android.support:mediarouter-v7:${ANDROID_VERSION}@aar"
compile "com.android.support:palette-v7:${ANDROID_VERSION}@aar"
compile "com.android.support:design:${ANDROID_VERSION}@aar"
compile "com.android.support:appcompat-v7:${ANDROID_VERSION}@aar"

compile "com.jumio.android:core:${SDK_VERSION}@aar"
compile "com.jumio.android:bam:${SDK_VERSION}@aar"
compile "com.jumio.android:nv:${SDK_VERSION}@aar"
compile "com.jumio.android:nv-mrz:${SDK_VERSION}@aar"
compile "com.jumio.android:nv-barcode:${SDK_VERSION}@aar"
compile "com.jumio.android:nv-barcode-vision:${SDK_VERSION}@aar"
compile "com.jumio.android:nv-liveness:${SDK_VERSION}@aar"
compile "com.jumio.android:dv:${SDK_VERSION}@aar"


compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'com.googlecode.libphonenumber', name: 'libphonenumber', 
version: '7.0'

compile('com.squareup.retrofit2:converter-simplexml:2.3.0') {
    exclude module: 'stax'
    exclude module: 'stax-api'
    exclude module: 'xpp3'
}

compile('org.simpleframework:simple-xml:2.7.1') {
    exclude group: 'stax', module: 'stax-api'
 compile('org.simpleframework:simple-xml:2.7.1') {
    exclude group: 'stax', module: 'stax-api'
    exclude group: 'xpp3', module: 'xpp3'
}

compile files('libs/simple-xml-2.7.1.jar')


compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.jakewharton:butterknife:8.8.1'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.9.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.kochava.base:tracker:3.2.0'
compile 'com.newrelic.agent.android:android-agent:5.+'

compile 'com.stripe:stripe-android:6.0.0'

testCompile 'junit:junit:4.12'
compile 'com.google.dagger:dagger:2.9'
annotationProcessor 'com.google.dagger:dagger-compiler:2.9'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.9'
provided 'javax.annotation:jsr250-api:1.0'

//for pay with google using google wallet service
compile 'com.google.android.gms:play-services-wallet:11.6.0'
compile 'com.google.android.gms:play-services:11.6.0'
compile 'com.google.firebase:firebase-core:11.6.0'
compile 'com.google.firebase:firebase-messaging:11.6.0'
compile 'org.jsoup:jsoup:1.11.2'

compile 


compile('com.amazonaws:aws-android-sdk-kms:2.6+') { transitive = true; }
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile "org.robolectric:robolectric:3.6.1"
      }
      dependencyManagement {
       imports {
    mavenBom 'com.amazonaws:aws-java-sdk-bom:1.11.257'
  }
   }

   apply plugin: 'com.google.gms.google-services'                                                

我已经包含了构建gradle文件以及应用程序级项目配置它无法下载该依赖项。任何帮助都将非常感激。我们正在使用gradle 4.1和docker容器来构建。我最初使用命令./gradle clean。

0 个答案:

没有答案