java.lang.NoSuchMethodError:没有静态方法combineMeasuredStates(II)我在课堂上

问题描述 投票:6回答:1

我有一个问题,我不确定为什么,还是一个新手,请帮忙。

错误:java.lang.NoSuchMethodError:没有静态方法combineMeasuredStates(II)我在类Landroid / support / v7 / widget / ViewUtils中;或其超级类('android.support.v7.widget.ViewUtils'的声明出现在/data/app/com.example.marvin.test-1/split_lib_dependencies_apk.apk:classes58.dex)

建立gradle:

     apply plugin: 'com.android.application'

android {
useLibrary 'org.apache.http.legacy'

compileSdkVersion 27
buildToolsVersion "27.0.2"
defaultConfig {
    applicationId "com.example.marvin.test"
    minSdkVersion 16
    targetSdkVersion 27
    multiDexEnabled true
    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(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', 
{
    exclude group: 'com.android.support', module: 'support-annotations'
})

compile 'com.android.support:appcompat-v7:27.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support:design:25.3.1'
compile 'com.google.android.gms:play-services:11.4.0'
compile 'com.google.firebase:firebase-auth:11.4.0'
testCompile 'junit:junit:4.12'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:exifinterface:25.3.1'
}



apply plugin: 'com.google.gms.google-services'
java android
1个回答
6
投票

使用相同版本的依赖项

compile 'com.android.support:appcompat-v7:27.0.1'
compile 'com.android.support:design:27.0.1'
compile 'com.android.support:exifinterface:27.0.1'
© www.soinside.com 2019 - 2024. All rights reserved.