Android版本构建中的NoClassDefFoundError
我使用的是Dagger 2和proguard,我的一个用户在从PlayStore安装后试图打开应用程序时出现了NoClassDefFoundError。他用的是KitKat,三星标签。我在这里不知所措。出了什么问题 以下是我的依赖项:Android版本构建中的NoClassDefFoundError,android,proguard,dagger-2,android-proguard,dagger,Android,Proguard,Dagger 2,Android Proguard,Dagger,我使用的是Dagger 2和proguard,我的一个用户在从PlayStore安装后试图打开应用程序时出现了NoClassDefFoundError。他用的是KitKat,三星标签。我在这里不知所措。出了什么问题 以下是我的依赖项: compile rootProject.ext.kotlinStdLib kapt rootProject.ext.dataBindingCompiler compile rootProject.ext.cardView compile rootProject
compile rootProject.ext.kotlinStdLib
kapt rootProject.ext.dataBindingCompiler
compile rootProject.ext.cardView
compile rootProject.ext.design
compile rootProject.ext.appCompat
compile rootProject.ext.hockeyApp
compile rootProject.ext.rxAndroid
compile rootProject.ext.everNoteJob
compile rootProject.ext.gpsServices
compile rootProject.ext.dagger
kapt rootProject.ext.daggerCompiler
provided rootProject.ext.javax
compile rootProject.ext.retrofit
compile rootProject.ext.retrofitRxJava
compile rootProject.ext.retrofitGson
compile rootProject.ext.okHttp
debugCompile rootProject.ext.okHttpLogger
debugCompile rootProject.ext.leakCanary
compile rootProject.ext.rxJava2
testCompile rootProject.ext.junit
testCompile rootProject.ext.assertj
testCompile rootProject.ext.mockitoKotlin
testCompile rootProject.ext.roboElectric
testCompile rootProject.ext.kotlinStdLib
androidTestCompile rootProject.ext.mockitoKotlin
androidTestCompile rootProject.ext.kotlinReflect
androidTestCompile rootProject.ext.kotlinStdLib
androidTestCompile rootProject.ext.espresso
androidTestCompile rootProject.ext.espressoIntents
androidTestCompile rootProject.ext.espressoTestRunner
androidTestCompile rootProject.ext.findBugs
androidTestCompile rootProject.ext.dexMaker
androidTestCompile rootProject.ext.uiAutomator
及其版本:
buildToolsVersion = "25.0.2"
jdkVersion = '1.8'
minSdkVersion = 19
targetSdkVersion = 25
compileSdkVersion = 25
kotlinStdLib = "org.jetbrains.kotlin:kotlin-stdlib-jre7:${kotlin_version}"
kotlinReflect = "org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}"
androidSupportVersion = '25.4.0'
daggerVersion = '2.9'
hockeyApp = "net.hockeyapp.android:HockeySDK:4.1.3"
appCompat = "com.android.support:appcompat-v7:${androidSupportVersion}"
design = "com.android.support:design:${androidSupportVersion}"
cardView = "com.android.support:cardview-v7:${androidSupportVersion}"
dagger = "com.google.dagger:dagger:${daggerVersion}"
daggerCompiler = "com.google.dagger:dagger-compiler:${daggerVersion}"
rxAndroid = "io.reactivex.rxjava2:rxandroid:2.0.1"
javax = "javax.annotation:jsr250-api:1.0"
dataBindingCompiler = "com.android.databinding:compiler:$gradle_plugin_version"
threeTenAbp = "com.jakewharton.threetenabp:threetenabp:1.0.5"
everNoteJob = "com.evernote:android-job:1.1.11"
gpsServices = "com.google.android.gms:play-services-gcm:11.0.1"
leakCanary = "com.squareup.leakcanary:leakcanary-android:1.5.1"
retrofitVersion = '2.2.0'
okhttpVersion = '3.7.0'
retrofit = "com.squareup.retrofit2:retrofit:${retrofitVersion}"
retrofitRxJava = "com.squareup.retrofit2:adapter-rxjava2:${retrofitVersion}"
retrofitGson = "com.squareup.retrofit2:converter-gson:${retrofitVersion}"
okHttp = "com.squareup.okhttp3:okhttp:${okhttpVersion}"
okHttpLogger = "com.squareup.okhttp3:logging-interceptor:${okhttpVersion}"
rxJava2 = "io.reactivex.rxjava2:rxjava:2.1.0"
powerMockVersion = '2.0.0-beta.5'
junit = "junit:junit:4.12"
mockitoKotlin = "com.nhaarman:mockito-kotlin:1.5.0"
assertj = "org.assertj:assertj-core:3.6.2"
roboElectric = "org.robolectric:robolectric:3.3.2"
espresso = "com.android.support.test.espresso:espresso-core:3.0.1"
espressoIntents = "com.android.support.test.espresso:espresso-intents:3.0.1"
espressoIdler = "com.android.support.test.espresso.idling:idling-concurrent:3.0.0"
espressoTestRunner = "com.android.support.test:runner:1.0.1"
dexMaker = "com.linkedin.dexmaker:dexmaker-mockito:2.2.0"
uiAutomator = "com.android.support.test.uiautomator:uiautomator-v18:2.1.3"
findBugs = "com.google.code.findbugs:jsr305:3.0.2"
这里有什么我做错了吗?你有没有得到堆栈跟踪?是否启用了multidex?stacktrace是NoClassDefFound错误。是的,在build.gradle文件中启用了multidex。你能显示完整的堆栈跟踪吗?未能加载哪个特定类?请提供更多详细信息,因为现在没有足够的信息来解决您的问题。您是否获得stacktrace?是否启用了multidex?stacktrace是NoClassDefFound错误。是的,在build.gradle文件中启用了multidex。您能显示完整的堆栈跟踪吗?未能加载哪个特定类?请告诉更多的细节,因为现在没有足够的信息来解决您的问题。