错误:无法找到:com.android.support:support-v4:20.0.+ [英] Error : Failed to find: com.android.support:support-v4:20.0.+

查看:685
本文介绍了错误:无法找到:com.android.support:support-v4:20.0.+的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在其中内置的Android Studio中导入了一个项目。我需要项目中的v4和v7库。这就是我的build.gradle的样子



build.gradle

  apply plugin:'android-library'

android {
compileSdkVersion 19
buildToolsVersion'20'
defaultConfig {
applicationId'com.example.sdk '
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName'1.0'
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
productFlavors {
}
}

依赖关系{
编译fileTree(dir:'libs',include:['* .jar'])
compile'c​​om.android.support:appcompat-v7:20.0。 +'
compile'c​​om.android.support:support-v4:20.0.+'
}

当我与gradle同步时,它总是给出错误混乱年龄


无法找到:com.android.support:support-v4:20.0.+&无法找到:com.android.support:appcompat-v7:20.0.+





请支持&感谢您的支持。

转到 Android SDK ,安装 Android支持库 Android支持库
也可以使用以下内容:

  compile'c​​om.android.support:support-v4:20.0.0' 
compile'c​​om.android.support:appcompat-v7:20.0.0'

改为

  compile'c​​om.android.support:appcompat-v7:20.0.+'
compile'c​​om.android .support:support-v4:20.0。+'


I have imported a project in Android Studio that was built in it. I require v4 and v7 library in the project. This is how my build.gradle looks like

build.gradle

apply plugin: 'android-library'

android {
    compileSdkVersion 19
    buildToolsVersion '20'
    defaultConfig {
        applicationId 'com.example.sdk'
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 1
        versionName '1.0'
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:20.0.+'
    compile 'com.android.support:support-v4:20.0.+'
}

When I sync with gradle then it always gives error message

Failed to find: com.android.support:support-v4:20.0.+ & Failed to find: com.android.support:appcompat-v7:20.0.+

Please support & thanks in advance.

解决方案

The Android support repository was missing,So go to Android SDK, install the Android Support Repository and Android Support Library. Also you can use the following

compile 'com.android.support:support-v4:20.0.0'
compile 'com.android.support:appcompat-v7:20.0.0'

instead of

compile 'com.android.support:appcompat-v7:20.0.+'
compile 'com.android.support:support-v4:20.0.+'

这篇关于错误:无法找到:com.android.support:support-v4:20.0.+的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆