Failed Resolution: Lokhttp3 / OkHttpClient $ Builder;

I am currently using Android studio 2.3 and have an error while deploying a py project on Kitkat devices, I did some explanations from here , but an error like below will happen.

E / UncaughtException: java.lang.NoClassDefFoundError: permission failed of: Lokhttp3 / OkHttpClient $ Builder;

and..

Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.OkHttpClient $ Builder" at path: DexPathList [[zip file] /data/app/com.mobile.myapp-2/base.apk ", zip file" / data /app/com.mobile.myapp-2/split_lib_dependencies_apk.apk ", zip file" /data/app/com.mobile.myapp-2/split_lib_slice_0_apk.apk ", zip file" /data/app/com.mobile.myapp -2 / split_lib_slice_1_apk.apk ", zip file" /data/app/com.mobile.myapp-2/split_lib_slice_2_apk.apk ", zip file" /data/app/com.mobile.myapp-2/split_lib_slice_3_apk.apk " zip file "/data/app/com.mobile.myapp-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_5_apk.apk", zip file "/ data / app / com.mobile.myapp-2 / split_lib_slice_6_apk.apk ", zip file" /data/app/com.mobile.myapp-2 / split_lib_slice_7_apk.apk ", zip file" / data / app / com. mobile.myapp-2 / split_lib_slice_8_apk.apk ", zip file" /data/app/com.mobile.myapp-2/split_lib_slice_9_apk.apk">,nativeLibraryDirectories= [/data/app/com.mobile.myapp-2/lib / x86, / vendor / lib, / system / lib]]

here is my build.gradle

apply plugin: 'com.android.application'

android {
    signingConfigs {
        config {
            keyAlias 'myappkey'
            keyPassword 'myapppass'
            storeFile file('D:/myapp.jks')
            storePassword 'myapppass'
        }
    }
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.my.app.mobile"
        minSdkVersion 21
        targetSdkVersion 25
        versionCode 6
        versionName "1.1.3"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true
    }
    productFlavors {
        dev {

            minSdkVersion 21
        }
        prod {

            minSdkVersion 21
            multiDexEnabled true
        }
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }

    buildTypes {
        debug {
            minifyEnabled false
            useProguard true
            proguardFile 'proguard-project.txt'
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
        }
        release {
            minifyEnabled false
//            useProguard false
//            multiDexKeepProguard 'multidex-config.pro'
            shrinkResources false
            zipAlignEnabled true
            debuggable false
            proguardFile 'proguard-project.txt'
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/services/javax.annotation.processing.Processor'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
   compile('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.10.2@aar') {
        transitive = true
    }
    compile('com.github.florent37:materialviewpager:1.2.0@aar') {
        transitive = true
    }
    compile 'com.squareup.okio:okio:1.7.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.5.0'
    compile 'com.squareup.okhttp3:okhttp:3.5.0'
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.retrofit2:converter-gson:2.0.0'
    compile 'com.mikepenz:iconics-core:2.8.1@aar'
    compile 'com.mikepenz:crossfadedrawerlayout:1.0.0@aar'
    compile 'com.mikepenz:fontawesome-typeface:4.7.0.0@aar'
    compile 'com.mikepenz:google-material-typeface:2.2.0.3.original@aar'
    compile 'com.mikepenz:fastadapter:2.1.5@aar'
    compile 'com.nhaarman.listviewanimations:lib-core:3.1.0'
    compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0'
    compile 'com.squareup:otto:1.3.8'
    compile 'com.android.support:cardview-v7:25.1.1'
    compile 'com.github.clans:fab:1.6.4'
    compile 'com.android.support:support-v4:25.1.1'
    compile 'com.jpardogo.materialtabstrip:library:1.1.1'
    compile 'com.jakewharton:butterknife:8.4.0'
    compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
    compile 'com.rengwuxian.materialedittext:library:2.1.4'
    compile 'com.github.rey5137:material:1.2.4'
    compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
    compile 'com.github.ganfra:material-spinner:1.1.1'
    compile 'com.splitwise:tokenautocomplete:2.0.8@aar'
    compile 'com.google.android.gms:play-services:10.2.0'
    compile 'com.melnykov:floatingactionbutton:1.0.7'
    compile 'com.cjj.materialrefeshlayout:library:1.3.0'
    compile 'com.theartofdev.edmodo:android-image-cropper:1.2.6'
    compile 'com.afollestad.material-dialogs:core:0.9.2.3'
    compile 'com.orhanobut:hawk:2.0.1'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
    compile 'com.google.firebase:firebase-ads:9.0.2'
    compile 'com.nononsenseapps:filepicker:4.0.0'
    compile 'com.google.firebase:firebase-core:10.2.0'
    compile 'com.google.firebase:firebase-crash:10.0.1'
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
    compile 'com.miguelcatalan:materialsearchview:1.4.0'
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.firebase-crash'

      

+3


source to share





All Articles