Gradle添加support包


build.gradl文件

dependencies{  
    compile fileTree(dir:'libs',include:"*.jar")  
    //compile project(':DependLibs:appcompat_v7')  
    compile 'com.android.support:support-v4:20.0.0'                                                                                                        }

 如果提示: Could not find com.android.support:support-v4:20

出现这种问题,自己先看看下图(是否安装过Android support Reposity):

Gradle添加support包_第1张图片

Android sdk的 Extras包里的Android Support Respository和Andoid Support Library是否 Installed,如果安装了

可以跑到下面目录找D:\sdk\extras\android\m2repository\com\android\support\support-v4\20.0.0

如安装目录有该文件,那么重新构建一下项目即可

你可能感兴趣的:(Gradle添加support包)