Faild解决Repository

时间:2017-02-04 08:48:26

标签: android android-studio android-gradle repository

我已将我的app.Gradle更新为building tools 25.0.2其已编译的库,如图所示

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "....."
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {  //to avoid the Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE    File1: C:\Users\dasse\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.2.2\3c8f6018eaa72d43b261181e801e6f8676c16ef6\jackson-databind-2.2.2.jar  File2: C:\Users\dasse\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.2.2\d20be6a5ddd6f8cfd36ebf6dea329873a1c41f1b\jackson-core-2.2.2.jar  File3: C:\Users\dasse\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.2.2\285cb9c666f0f0f3dd8a1be04e1f457eb7b15113\jackson-annotations-2.2.2.jar
        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'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile('com.mikepenz:materialdrawer:5.8.1@aar') { transitive = true }

    compile 'com.android.support:appcompat-v7:25.2.1'
    compile 'com.android.support:design:25.2.1'
    compile 'com.android.support:support-v4:25.1.1'
    compile 'com.mikepenz:google-material-typeface:2.2.0.1@aar'
    compile 'com.mikepenz:fontawesome-typeface:4.6.0.3@aar'

    compile 'com.sothree.slidinguppanel:library:3.3.1'

    compile "com.android.support:support-v4:25.1.1"
    compile "com.android.support:support-v13:25.1.1"
    compile "com.android.support:cardview-v7:25.1.1"
    compile 'com.android.support:support-v4:25.1.1'

    compile 'com.google.firebase:firebase-database:10.0.1'
    compile 'com.google.firebase:firebase-crash:10.0.1'
    compile 'com.google.firebase:firebase-auth:10.0.1'
    compile 'com.firebase:firebase-client-android:2.3.1'

    compile project(path: ':silo-upstream-release')

    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
    compile 'com.android.support:recyclerview-v7:25.1.1'
    compile 'com.android.support:cardview-v7:25.1.1'

    compile 'com.github.tiagohm:CodeView:0.1.3'

    testCompile 'junit:junit:4.12'
}

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

然后同步项目

enter image description here

我已经多次点击安装并重启android studio没有任何效果,安装或下载repos。从未开始

注意:我有一个程序跟踪网络的代码和使用它的程序,它说Android-St。速度接近5秒,然后什么都不做,速度重新变为零

1 个答案:

答案 0 :(得分:5)

您使用的是错误的依赖关系 检查official page

支持库 25.2.1不存在。
使用最新版本:

compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:25.1.1'