无法解析android studio项目

时间:2017-03-09 06:31:47

标签: android build.gradle

当我将gradle版本从24.2.1更新到25.0.1时,我遇到了问题 并显示以下错误。

  

错误:(66,13)无法解决:   com.android.support:support-v7:25.0.1           安装存储库和同步项目       
在文件中显示       
      在“项目结构”对话框中显示

我的gradle(app)我已将代码24.2.1更新为25.01

apply plugin: 'com.android.application'
android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"
    defaultConfig {
        applicationId "com.teledaktar"
        multiDexEnabled true
        minSdkVersion 16
        targetSdkVersion 23


        versionCode 22
        versionName "1.22.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        manifestPlaceholders = [HOCKEYAPP_APP_ID: "f2980c21293944029650fe21bb727599"]
    }
    aaptOptions {
        cruncherEnabled = false
    }
    lintOptions {
        checkReleaseBuilds false
    }
    aaptOptions {
        cruncherEnabled = false
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }
    buildTypes {
        release {
            minifyEnabled false
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude 'META-INF/NOTICE'
    }
}
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'
    })
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:recyclerview-v7:25.0.1'
    compile 'com.android.support:appcompat-v7:25.0.1'
    compile 'com.android.support:design:25.0.1'
//    compile 'com.android.support:appcompat-v7:24.2.1'
//    compile 'com.android.support:design:24.2.1'
//    compile 'com.android.support:recyclerview-v7:24.2.1'

    compile 'com.firebase:firebase-client-android:2.5.2'
    compile 'com.google.firebase:firebase-messaging:9.6.1'
    compile 'com.squareup.okhttp3:okhttp:3.2.0'
    compile 'com.android.support:cardview-v7:25.0.1'
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
    compile 'com.android.support:palette-v7:25.0.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support.test.espresso:espresso-core:2.2.2'
    compile 'com.android.support:support-v7:25.0.1'
    compile 'com.google.android.gms:play-services:9.6.1'
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:multidex:1.0.0'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'cn.pedant.sweetalert:library:1.3'
    compile 'com.mxn.soul:flowingdrawer-core:1.2.5'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'es.voghdev.pdfviewpager:library:1.0.1'
    compile 'com.github.ceryle:RadioRealButton:v1.4.3'
    compile 'com.rm:rmswitch:1.2.1'
    compile 'com.github.recruit-lifestyle:WaveSwipeRefreshLayout:1.6'
    compile "com.daimajia.swipelayout:library:1.2.0@aar"
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'

    compile 'com.github.arimorty:floatingsearchview:2.0.3'
    compile 'org.jsoup:jsoup:1.10.1'

    compile 'com.github.rampo.updatechecker:library:2.1.8'
    compile 'com.github.danielemaddaluno.androidupdatechecker:library:1.0.2'
    compile 'com.github.d-max:spots-dialog:0.4@aar'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'com.github.paolorotolo:appintro:4.1.0'
    compile 'net.hockeyapp.android:HockeySDK:4.1.1'
    compile 'com.thomashaertel:multispinner:0.1.1@aar'
}
apply plugin: 'com.google.gms.google-services' 

和clashpath 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:2.3.0'
        classpath 'com.google.gms:google-services:3.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

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

有没有解决方案?我安装了25.01,并且发生了同样的问题。

0 个答案:

没有答案