简体   繁体   English

Android支持库Gradle同步错误

[英]Android Support library Gradle sync error

Why I get following error? 为什么会出现以下错误?
I wanted to update my support libraries from Android and searched alot but didn't find anything appropriate to my problem. 我想从Android更新我的支持库,并进行了大量搜索,但没有找到适合我的问题的内容。

Android Studio Gradle同步错误

here is my app.gradle: 这是我的app.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.ussystech.calc"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.android.support:recyclerview-v7:23.1.0'
    compile 'com.android.support:cardview-v7:23.1.0'
    compile 'com.android.support:design:23.0.1'

}

Update Android Support Repository and Android Support Library in your Android SDK manager. 在您的Android SDK管理器中更新Android Support RepositoryAndroid Support Library

By the way, I recommend you to use com.android.support:design:23.1.0 instead of com.android.support:design:23.0.1 顺便说一句,我建议您使用com.android.support:design:23.1.0而不是com.android.support:design:23.0.1

Providing that "Install Repository and sync project" doesn't work I would ensure you're properly connected to the internet. 如果“安装存储库和同步项目”无效,我将确保您已正确连接到Internet。 The organization I work for does funny stuff with certificates which break SSL which can result in this error you are receiving. 我工作的组织使用证书破坏了SSL,这可能会导致您收到此错误,这很有趣。 If that's the case, open Android SDK Manager, go to Preferences/Settings, and then check "Force https://". 如果是这种情况,请打开Android SDK Manager,转到“首选项/设置”,然后选中“强制https://”。 You may also need to clear the download cache which is located just above that check box. 您可能还需要清除位于该复选框正上方的下载缓存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM