使用特定库

时间:2018-02-19 13:27:08

标签: java android noclassdeffounderror

只有当我使用特定的图书馆和adobe鸟舍图书馆时才会收到NoClassDefFoundError。 Gradle和错误如下所示当我不使用该裁剪库时,代码似乎正在工作。我真的想使用该库,因为我的所有代码都是根据它配置的。请给我一个解决方案

    apply plugin: 'com.android.application'

    android {
    compileSdkVersion 26
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId "com.jetslice.retroart1"
        manifestPlaceholders = [appPackageName: "com.jetslice.retroart1"]
        minSdkVersion 19
        targetSdkVersion 26
        renderscriptTargetApi 21
        renderscriptSupportModeEnabled true
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dexOptions {
        jumboMode true
    }
    dexOptions {
        javaMaxHeapSize "64k"
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })






    compile 'com.android.support:design:26.0.0-alpha1'

    compile 'com.android.support:design:26.0.0-alpha1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.github.clans:fab:1.6.4'
    compile 'com.adobe.creativesdk.foundation:auth:0.9.1251'
    compile 'com.adobe.creativesdk:image:4.8.4'
    compile 'com.localytics.android:library:3.8.0'
    compile 'com.adobe.creativesdk.foundation:assetux:0.9.1251'
    compile 'com.adobe.creativesdk.foundation:assetcore:0.9.1251'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.ms.square:glassview:0.1.0'
    compile 'com.android.support:support-v4:26.+'
    compile 'com.jpeng:jpspringmenu:1.0.1'
    compile 'com.github.mzelzoghbi:zgallery:0.3'

    compile 'com.github.doctoror.particlesdrawable:library:1.0.8'
    compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
    compile 'hanks.xyz:htextview-library:0.1.5'
    compile 'com.github.MorochoRochaDarwin:HorizontalScrollMenu:2.0.0'
    compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
    testCompile 'junit:junit:4.12'
    }

错误:

02-19 18:55:48.042 25223-25223/com.jetslice.retroart1 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.jetslice.retroart1, PID: 25223
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/os/AsyncTaskCompat;
    at com.adobe.creativesdk.aviary.AdobeImageEditorActivityAbstract.loadTools(AdobeImageEditorActivityAbstract.java:760)
    at com.adobe.creativesdk.aviary.AdobeImageEditorActivityAbstract.onPostCreate(AdobeImageEditorActivityAbstract.java:579)
    at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1195)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2542)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2626)
    at android.app.ActivityThread.-wrap11(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475)
    at android.os.Handler.dispatchMessage(Handler.java:111)
    at android.os.Looper.loop(Looper.java:207)
    at android.app.ActivityThread.main(ActivityThread.java:5740)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:766)
 Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.os.AsyncTaskCompat" on path: DexPathList[[zip file "/data/app/com.jetslice.retroart1-1/base.apk"],nativeLibraryDirectories=[/data/app/com.jetslice.retroart1-1/lib/arm, /data/app/com.jetslice.retroart1-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
    at com.adobe.creativesdk.aviary.AdobeImageEditorActivityAbstract.loadTools(AdobeImageEditorActivityAbstract.java:760) 
    at com.adobe.creativesdk.aviary.AdobeImageEditorActivityAbstract.onPostCreate(AdobeImageEditorActivityAbstract.java:579) 
    at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1195) 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2542) 
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2626) 
    at android.app.ActivityThread.-wrap11(ActivityThread.java) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475) 
    at android.os.Handler.dispatchMessage(Handler.java:111) 
    at android.os.Looper.loop(Looper.java:207) 
    at android.app.ActivityThread.main(ActivityThread.java:5740) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:766) 
    Suppressed: java.lang.ClassNotFoundException: android.support.v4.os.AsyncTaskCompat
    at java.lang.Class.classForName(Native Method)
    at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
    at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
            ... 14 more
 Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

0 个答案:

没有答案