Android发布版本中的NoClassDefFoundError

时间:2017-11-02 21:18:02

标签: android proguard dagger-2 android-proguard dagger

我使用的是Dagger 2和proguard,我的一个用户在从PlayStore安装后尝试打开应用时会收到NoClassDefFoundError。他正在使用KitKat,Samsung TabS。我在这里不知所措。可能出现什么问题?

以下是我的依赖项:

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"

我在这里做错了什么吗?

0 个答案:

没有答案