jin*_*ham 6 android android-support-library build.gradle
我正在尝试做一个应用程序,但现在gradle文件似乎有些错误.在升级支持库之前,它工作正常.我正在使用api 21工作正常,但随后我升级到api22并相应地更改了gradle文件..现在出现此错误.
Error:Failed to find: com.android.support:support-v4:22.2.0
Run Code Online (Sandbox Code Playgroud)
这是我当前的gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.sampleapp"
minSdkVersion 12
targetSdkVersion 22
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:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.jakewharton:butterknife:6.1.0'
}
Run Code Online (Sandbox Code Playgroud)
任何帮助,将不胜感激.
如果这可能对某人有帮助,经过多次试验和错误,我发现我在与“library”相对应的 build.gradle 文件中定位了错误的 SDK 版本(较旧的版本)。要更改此设置,您可以手动执行此操作或转到模块设置菜单(右键单击项目文件夹 -> 打开模块设置。然后在“库”-属性中,您可以更改编译 Sdk 和构建工具版本