自从我把我的Nexus 5x升级到Android O DP3之后,我无法测试我的应用程序。我收到了一个错误,说我的Gradle文件没有配置为与新的API级别(26)一起使用。
所以我改变了这个和依赖关系,但是我仍然在所有支持库上遇到错误,比如
Failed to resolve: com.android.support:design:26.0.0-beta2
点击
Install repository and sync project
弹出进度对话框以下载正确的依赖项,但不会移除错误。清理项目,安装存储库,然后重新构建项目也不起作用。
appcompat-v7
在 appcompat-v7:26.0.0-beta2 上,在进行 Gradle 同步之前,我会收到带有以下错误的快速行:
When using a compileSdkVersion older than android-O revision 2,
the support library version must be 26.0.0-alpha1 or lower (was 26.0.0-beta2)
有人可以帮我正确地配置Gradle文件以适用于Android API 26吗?非常感谢您的任何帮助。
附注:目前我正在使用Gradle 3.0.0-alpha3,但在Gradle 2.3.2上也遇到了同样的错误。
我的Gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.0'
defaultConfig {
applicationId "********"
minSdkVersion 21
targetSdkVersion 26
versionCode 3
versionName "2.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.0.0-beta2'
compile 'com.android.support:design:26.0.0-beta2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:cardview-v7:26.0.0-beta2'
compile 'com.android.support:recyclerview-v7:26.0.0-beta2'
compile 'com.redbooth:WelcomeCoordinator:1.0.1'
compile 'com.github.kittinunf.fuel:fuel-android:1.4.0'
compile 'com.pkmmte.view:circularimageview:1.1'
compile 'com.ramotion.foldingcell:folding-cell:1.1.0'
}