gpt4 book ai didi

java - NoSuchMethodError:没有静态方法 setOnApplyWindowInsetsListener

转载 作者:搜寻专家 更新时间:2023-11-01 09:39:03 25 4
gpt4 key购买 nike

我正在编译我的项目,突然遇到一个致命异常:NoSuchMethodError 错误

附加信息

build.gradle

apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.incorp.eronlabs.dictapp"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.google.android.gms:play-services-ads:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.simplecityapps:recyclerview-fastscroll:1.0.11'

testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

这是 LogCat

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.incorp.eronlabs.dictapp, PID: 12816
java.lang.NoSuchMethodError: No static method setOnApplyWindowInsetsListener(Landroid/view/View;Landroid/support/v4/view/OnApplyWindowInsetsListener;)V in class Landroid/support/v4/view/ViewCompatLollipop; or its super classes (declaration of 'android.support.v4.view.ViewCompatLollipop' appears in /data/data/com.incorp.eronlabs.dictapp/files/instant-run/dex/slice-internal_impl-24.2.0_9cb479e147afde859c42f0015b56fc92a26fd3f7-classes.dex)
at android.support.v4.view.ViewCompat$LollipopViewCompatImpl.setOnApplyWindowInsetsListener(ViewCompat.java:1619)
at android.support.v4.view.ViewCompat.setOnApplyWindowInsetsListener(ViewCompat.java:2924)
at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:425)
at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:312)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:277)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.incorp.eronlabs.dictapp.Splash.onCreate(Splash.java:22)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

最佳答案

RecyclerView-FastScroll 使用支持库的“24.*.*”版本,因此这可能导致其期望的类与实际存在的类不匹配。

将您的支持依赖项更新为 24(或者更新到 25)可能会解决您的问题。参见 https://stackoverflow.com/a/39108322/1452094

关于java - NoSuchMethodError:没有静态方法 setOnApplyWindowInsetsListener,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40981477/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com