找不到recyclerview-v7.jar(com.android.support:recyclerview-v7:27.1.1)

时间:2018-07-23 01:19:53

标签: android android-recyclerview android-gradle

我将targetSdkVerison版本升级到27, 我的课程路径

classpath 'com.android.tools.build:gradle:2.2.2'

但是当我添加一个依赖项

compile 'com.android.support:recyclerview-v7:27.1.1'

我遇到了这个错误

Could not find recyclerview-v7.jar (com.android.support:recyclerview-v7:27.1.1).
Searched in the following locations:
    https://jcenter.bintray.com/com/android/support/recyclerview-v7/27.1.1/recyclerview-v7-27.1.1.jar

Please install the Android Support Repository from the Android SDK Manager.
Open Android SDK Manager

我已经安装了Android支持存储库,并且当我单击此链接时

{
  "errors" : [ {
    "status" : 404,
    "message" : "Could not find resource"
  } ]
}

所以我不知道如何解决

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
    compileSdkVersion 27
    buildToolsVersion "27.0.3"

    defaultConfig {
        applicationId "XXX.XXX.XXX"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 65
        versionName "4.6"
        multiDexEnabled true;
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

    configurations {
        all*.exclude group: 'com.mopub.volley'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }

    lintOptions {
        abortOnError false
    }

    useLibrary 'org.apache.http.legacy'
}
repositories {
    jcenter()
    flatDir {
        dirs 'libs'
    }
    maven {
        url 'https://maven.google.com/'
        name 'Google'
    }
}
allprojects {
    repositories {
        mavenCentral()
    }
    sourceSets { main { java.srcDirs = ['src/main/java', 'src/test/java'] } }
}
dependencies {
    compile 'com.android.support:multidex:1.0.0'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile project(':MaterialLibs')
    compile project(':MaterialNavigationDrawerLibs')
    compile files('libs/amazon-ads-5.6.20.jar')
    compile files('libs/AudienceNetwork.jar')
    androidTestCompile fileTree(include: ['robotium-solo-5.5.3.jar'], dir: 'libs')
    compile project(':mopub-sdk')
    testCompile 'junit:junit:4.12'
    testCompile "org.mockito:mockito-core:1.10.19"

    //add the tips
    compile 'com.android.support:design:27.1.1'
    compile 'com.android.support:appcompat-v7:27.1.1'
    compile 'com.android.support:recyclerview-v7:27.1.1'
    compile 'com.android.support:cardview-v7:27.1.1'

    compile 'junit:junit:4.12'
    compile files('libs/java2html.jar')
    compile files('libs/slf4j-api-1.7.7.jar')
    compile files('libs/flickrj-android-2.1.0.jar')
    compile(name: 'Common-2016.2.504-dev-release', ext: 'aar')
    compile(name: 'Chart-2016.2.504-dev-release', ext: 'aar')
    compile(name: 'Primitives-2016.2.504-dev-release', ext: 'aar')
    compile project(':draggridview')
    compile 'com.google.android.gms:play-services-ads:9.4.0'
    compile 'com.google.android.gms:play-services-appindexing:9.4.0'
    compile files('libs/libs/umeng-analytics-v6.1.2.jar')
}

当我升级到'com.android.tools.build:gradle:3.1.3'时,它可以工作,但是为什么 (2.2.2)出现此错误

0 个答案:

没有答案