gpt4 book ai didi

android - 无法解决以下问题:Landroid/support/v7/widget/ListViewCompat;

转载 作者:行者123 更新时间:2023-12-03 05:09:28 30 4
gpt4 key购买 nike

我尝试将应用程序的支持库从26.0.2更新为27.1.0,但遇到以下错误。

Gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId 'APPLICATION_ID'
minSdkVersion 17
targetSdkVersion 27
versionCode 240
versionName "2.4.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
useLibrary 'org.apache.http.legacy'
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:support-v13:27.1.0'
implementation 'com.android.support:support-vector-drawable:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
androidTestImplementation 'com.android.support:support-annotations:27.1.0'
implementation 'com.google.android.gms:play-services-location:11.0.4'
implementation 'com.google.android.gms:play-services-analytics:11.0.4'
implementation 'com.google.android.gms:play-services-gcm:11.0.4'
api 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.android.support:support-media-compat:27.1.0'
implementation 'com.squareup.picasso:picasso:2.71828'
}
apply plugin: 'com.google.gms.google-services'

错误
05-18 02:56:15.744 13645-13645/net.kord_music.android E/AndroidRuntime: FATAL EXCEPTION: main
Process: net.kord_music.android, PID: 13645
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/ListViewCompat;
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at com.activeandroid.ModelInfo.scanForModelClasses(ModelInfo.java:187)
at com.activeandroid.ModelInfo.scanForModel(ModelInfo.java:152)
at com.activeandroid.ModelInfo.<init>(ModelInfo.java:63)
at com.activeandroid.Cache.initialize(Cache.java:66)
at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:44)
at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:34)
at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:30)
at com.activeandroid.app.Application.onCreate(Application.java:25)
at system.G.onCreate(G.java:51)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1028)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5658)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.ListViewCompat" on path: DexPathList[[zip file "/data/app/net.kord_music.android-1/base.apk"],nativeLibraryDirectories=[/data/app/net.kord_music.android-1/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at java.lang.Class.classForName(Native Method) 
at java.lang.Class.forName(Class.java:400) 
at com.activeandroid.ModelInfo.scanForModelClasses(ModelInfo.java:187) 
at com.activeandroid.ModelInfo.scanForModel(ModelInfo.java:152) 
at com.activeandroid.ModelInfo.<init>(ModelInfo.java:63) 
at com.activeandroid.Cache.initialize(Cache.java:66) 
at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:44) 
at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:34) 
at com.activeandroid.ActiveAndroid.initialize(ActiveAndroid.java:30) 
at com.activeandroid.app.Application.onCreate(Application.java:25) 
at system.G.onCreate(G.java:51) 
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1028) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5658) 
at android.app.ActivityThread.-wrap2(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637) 
at android.os.Handler.dispatchMessage(Handler.java:105) 
at android.os.Looper.loop(Looper.java:156) 
at android.app.ActivityThread.main(ActivityThread.java:6523) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832) 

最佳答案

我有同样的问题,解决了
将每个XML标签“android.support.v7.widget.ListViewCompat”更改为“android.widget.ListView”

关于android - 无法解决以下问题:Landroid/support/v7/widget/ListViewCompat;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50401371/

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