支持appcompat不能编译Android Studio

时间:2017-04-21 15:20:46

标签: android

我刚刚将Android Studio更新为2.3.1,并且我在我的gradle中收到此错误

compile 'com.android.support:appcompat-v7:25.2.0'

所有com.android.support库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。找到版本25.3.1,25.1.1。示例包括com.android.support:animated-vector-drawable:25.3.1和com.android.support:support-v13:25.1.1

所以我确实将该行更新为:

compile 'com.android.support:appcompat-v7:25.3.1'

仍然没有工作! SDK安装为:24.2和25.3

Gradle:

apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId 
    minSdkVersion 15
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.wdullaer:materialdatetimepicker:3.1.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'

0 个答案:

没有答案