java.lang.NoClassDefFoundError: io.fabric.sdk.android.services.common.FirebaseInfo после добавления httpclient

После добавления библиотеки HttpClient "cz.msebera.android:httpclient:4.4.1.2" в граделе для составных изображений для загрузки на сервер. Эта ошибка начинает генерироваться в logcat. Я включил multidex и перепробовал все доступное по схожим вопросам.

После удаления этой библиотеки проект работает отлично.

Может кто-нибудь помочь мне в этом и предложить другие способы загрузки нескольких изображений и видео на сервер.

Logcat:

 11-14 18:13:44.881 561-2054/? I/ActivityManager: Start proc com.volleyfragment for activity com.volleyfragment/login.activity.LR_MainActivity: pid=27670 uid=10042 gids={50042, 3003, 1028}
    11-14 18:13:44.971 561-632/? W/NetworkManagementSocketTagger: setKernelCountSet(10042, 1) failed with errno -13
    11-14 18:13:45.011 27670-27670/com.volleyfragment E/dalvikvm: Could not find class 'io.fabric.sdk.android.services.common.FirebaseInfo', referenced from method com.crashlytics.android.CrashlyticsInitProvider.onCreate
    11-14 18:13:45.011 27670-27670/com.volleyfragment W/dalvikvm: VFY: unable to resolve new-instance 8353 (Lio/fabric/sdk/android/services/common/FirebaseInfo;) in Lcom/crashlytics/android/CrashlyticsInitProvider;
    11-14 18:13:45.011 27670-27670/com.volleyfragment D/dalvikvm: VFY: replacing opcode 0x22 at 0x0006
    11-14 18:13:45.011 27670-27670/com.volleyfragment W/dalvikvm: VFY: unable to find class referenced in signature (Lio/fabric/sdk/android/services/common/FirebaseInfo;)
    11-14 18:13:45.011 27670-27670/com.volleyfragment I/dalvikvm: Could not find method io.fabric.sdk.android.services.common.FirebaseInfo.isFirebaseCrashlyticsEnabled, referenced from method com.crashlytics.android.CrashlyticsInitProvider.shouldInitializeFabric
    11-14 18:13:45.011 27670-27670/com.volleyfragment W/dalvikvm: VFY: unable to resolve virtual method 61901: Lio/fabric/sdk/android/services/common/FirebaseInfo;.isFirebaseCrashlyticsEnabled (Landroid/content/Context;)Z
    11-14 18:13:45.011 27670-27670/com.volleyfragment D/dalvikvm: VFY: replacing opcode 0x6e at 0x0000
    11-14 18:13:45.011 27670-27670/com.volleyfragment D/dalvikvm: DexOpt: unable to opt direct call 0xf1cb at 0x08 in Lcom/crashlytics/android/CrashlyticsInitProvider;.onCreate
    11-14 18:13:45.011 27670-27670/com.volleyfragment W/dalvikvm: Unable to resolve superclass of Lcom/crashlytics/android/Crashlytics; (8334)
    11-14 18:13:45.011 27670-27670/com.volleyfragment W/dalvikvm: Link of class 'Lcom/crashlytics/android/Crashlytics;' failed
    11-14 18:13:45.011 27670-27670/com.volleyfragment D/dalvikvm: DexOpt: unable to opt direct call 0x6435 at 0x1c in Lcom/crashlytics/android/CrashlyticsInitProvider;.onCreate
    11-14 18:13:45.031 27670-27670/com.volleyfragment D/AndroidRuntime: Shutting down VM
    11-14 18:13:45.031 27670-27670/com.volleyfragment W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x94c47b20)
    11-14 18:13:45.041 27670-27670/com.volleyfragment E/AndroidRuntime: FATAL EXCEPTION: main
                                                                        Process: com.volleyfragment, PID: 27670
                                                                        java.lang.NoClassDefFoundError: io.fabric.sdk.android.services.common.FirebaseInfo
                                                                            at com.crashlytics.android.CrashlyticsInitProvider.onCreate(CrashlyticsInitProvider.java:22)
                                                                            at android.content.ContentProvider.attachInfo(ContentProvider.java:1591)
                                                                            at android.content.ContentProvider.attachInfo(ContentProvider.java:1562)
                                                                            at android.app.ActivityThread.installProvider(ActivityThread.java:4792)
                                                                            at android.app.ActivityThread.installContentProviders(ActivityThread.java:4387)
                                                                            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4327)
                                                                            at android.app.ActivityThread.access$1500(ActivityThread.java:135)
                                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                            at android.os.Looper.loop(Looper.java:136)
                                                                            at android.app.ActivityThread.main(ActivityThread.java:5019)
                                                                            at java.lang.reflect.Method.invokeNative(Native Method)
                                                                            at java.lang.reflect.Method.invoke(Method.java:515)
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                                                                            at dalvik.system.NativeStart.main(Native Method)
    11-14 18:13:45.051 561-570/? W/ActivityManager:   Force finishing activity com.volleyfragment/login.activity.LR_MainActivity
    11-14 18:13:45.381 779-779/? D/FirebaseApp: Notifying background state change listeners.
    11-14 18:13:45.381 779-779/? D/Tinker.DefaultAppLike: onTrimMemory level:20
    11-14 18:13:45.431 561-574/? W/WindowManager: updateFocusedWindowLocked, focusedAppToken is null.
    11-14 18:13:45.471 779-940/? W/DebugConnManager: getNetworkInfo() on networkType 1

Мой Gradle:

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "com.volleyfragment"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    dexOptions {
        javaMaxHeapSize "4g"

    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

repositories {
    mavenCentral()
    maven { url 'https://maven.fabric.io/public' }
}

configurations.all() {
    exclude group: "org.apache.httpcomponents", module: "httpclient"
    exclude group: 'com.google.firebase', module: 'firebase-common'
    exclude group: 'com.google.firebase', module: 'firebase-core'
    exclude group: 'com.google.firebase', module: 'firebase-iid'
}

dependencies {
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.google.code.findbugs:jsr305:2.0.1'
    compile 'com.android.support:support-v4:26+'
    compile 'com.android.support:appcompat-v7:26+'
    compile 'com.android.support:customtabs:26+'
    compile 'com.android.support:design:26+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    compile 'com.ss.bottomnavigation:bottomnavigation:1.5.2'
    compile 'com.android.support:recyclerview-v7:26+'
    compile 'com.android.support:cardview-v7:26+'
    compile 'com.android.volley:volley:1.0.0'
    compile files('libs/YouTubeAndroidPlayerApi.jar')
    compile 'com.mikhaellopez:circularimageview:3.0.2'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.android.gms:play-services-auth:11.0.0'
    compile 'com.google.android.gms:play-services-plus:11.0.0'
    compile ('com.google.api-client:google-api-client:1.23.0'){
        exclude module: 'support-v4'
        exclude module: 'support-annotations'
    }
  //  compile 'com.google.oauth-client:google-oauth-client-jetty:1.23.0'
    compile 'com.google.apis:google-api-services-people:v1-rev163-1.23.0'
    compile 'com.android.support:support-v13:26.0.0-alpha1'
    compile 'com.github.apl-devs:appintro:v4.2.2'
    compile 'com.github.florent37:materialtextfield:1.0.7'
    compile 'com.hbb20:ccp:2.0.8' // library for country code
    compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
    compile 'com.github.danylovolokh:video-player-manager:0.2.0'
    compile "cz.msebera.android:httpclient:4.4.1.2"
    compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
        transitive = true;
    }

}

apply plugin: 'com.google.gms.google-services'
allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

0 ответов

Другие вопросы по тегам