我在我的项目中使用XMPPConnection
和Quickblox
。我从gradle项目中排除模块minidns
并编译了lib' de.measite.minidns:minidns-hla :0.2.4'对于XamppConnection.But当我运行QuickBlox模块并执行QBChatService.getInstance时,我收到此错误。如果再次包含minidns,则表示MergeDex错误。
如果我从依赖项中删除lib,则在XamppConnection中获取错误。
这是代码和日志:
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.cmyName.pakagename"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0.0"
multiDexEnabled true
manifestPlaceholders = [ api_key_crashlytics:"3098cc1803ddd3e89202a79cdd28c2360f00a2d9"]
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "armeabi", "armeabi-v8a", "x86", "mips"
}
configurations {
all*.exclude module: 'minidns'
}
flavorDimensions "default"
// configurations {
// compile.exclude group: 'com.google.android.gms'
// }
}
aaptOptions {
cruncherEnabled = false
}
dependencies {
compile 'com.google.code.gson:gson:2.8.2'
implementation 'de.measite.minidns:minidns-hla:0.2.4'
compile 'org.jxmpp:jxmpp-util-cache:0.5.0'
compile 'org.jxmpp:jxmpp-core:0.5.0'
} return
下面是崩溃日志
java.lang.NoClassDefFoundError: Failed resolution of: Lde/measite/minidns/Client;
at org.jivesoftware.smack.util.dns.minidns.MiniDnsResolver.<init>(Unknown Source)
at org.jivesoftware.smack.util.dns.minidns.MiniDnsResolver.<clinit>(Unknown Source)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at org.jivesoftware.smack.SmackInitialization.loadSmackClass(Unknown Source)
at org.jivesoftware.smack.SmackInitialization.parseClassesToLoad(Unknown Source)
at org.jivesoftware.smack.SmackInitialization.processConfigFile(Unknown Source)
at org.jivesoftware.smack.SmackInitialization.processConfigFile(Unknown Source)
at org.jivesoftware.smack.SmackInitialization.<clinit>(Unknown Source)
at org.jivesoftware.smack.SmackConfiguration.getVersion(Unknown Source)
at org.jivesoftware.smack.ConnectionConfiguration.<clinit>(Unknown Source)
at com.quickblox.chat.QBChatService.<clinit>(Unknown Source)
at com.quickblox.chat.QBChatService.getInstance(Unknown Source)
at dailer.com.magic.vuetel.activities.OpponentsActivity.isLoggedInChat(OpponentsActivity.java:235)
at dailer.com.magic.vuetel.activities.OpponentsActivity.onOptionsItemSelected(OpponentsActivity.java:212)
at android.app.Activity.onMenuItemSelected(Activity.java:2975)
at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:368)
at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:195)
at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:108)
at android.support.v7.app.AppCompatDelegateImplV9.onMenuItemSelected(AppCompatDelegateImplV9.java:674)
at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:822)
at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:171)
at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:973)
at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:963)
at android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:624)
at android.support.v7.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:150)
at android.view.View.performClick(View.java:5226)
at android.view.View$PerformClick.run(View.java:21350)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5582)
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)
Caused by: java.lang.ClassNotFoundException: Didn't find class "de.measite.minidns.Client" on path: DexPathList[[zip file "/data/app/com.cmyName.pakagename-2/base.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.cmyName.pakagename-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.cmyName.pakagename-2/lib/arm, /data/app/com.cmyName.pakagename-2/base.apk!/lib/armeabi, /data/app/com.cmyName.pakagename-2/split_lib_dependencies_apk.apk!/lib/armeabi, /data/app/com.cmyName.pakagename-2/split_lib_slice_0_apk.apk!/lib/armeabi, /data/app/dia