我正在运行一个版本为 4.4.4 的 Android 应用程序加载应用程序后我无法点击任何按钮,在 logcat 中这是一个错误:
E/dalvikvm: Could not find class 'dalvik.system.DelegateLastClassLoader', referenced from method ab.b
这是我的 gradle 文件:
apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.app.name" minSdkVersion 14 targetSdkVersion 28 versionCode 105 versionName "1.0.5" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } lintOptions { checkReleaseBuilds false } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation 'com.google.android.gms:play-services-ads:17.1.2' }
在更高的 android 版本中一切正常。请帮助)
最佳答案
将您的编译sdk版本
和目标版本
降低到26
并更改 appcompat-v7
到以下
com.android.support:appcompat-v7:26.0.0-beta1
然后检查运行它。
关于java - 找不到类 'dalvik.system....',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54074050/