没有找到类“bolt.AppLinks”

时间:2017-11-09 16:47:14

标签: android

当我尝试将我的Android应用程序启动到设备时,崩溃时发生了一个奇怪的错误。两天前发生此问题。这是错误:

11-09 17:27:30.461 25146-25146/com.ten.ten E/AndroidRuntime: FATAL EXCEPTION: main
                                                                     Process: com.ten.ten, PID: 25146
                                                                     java.lang.NoClassDefFoundError: Failed resolution of: Lbolts/AppLinks;
                                                                         at com.facebook.appevents.internal.SourceApplicationInfo$Factory.create(SourceApplicationInfo.java:131)
                                                                         at com.facebook.appevents.internal.ActivityLifecycleTracker.onActivityCreated(ActivityLifecycleTracker.java:131)
                                                                         at com.facebook.appevents.internal.ActivityLifecycleTracker$1.onActivityCreated(ActivityLifecycleTracker.java:77)
                                                                         at android.app.Application.dispatchActivityCreated(Application.java:219)
                                                                         at android.app.Activity.onCreate(Activity.java:1040)
                                                                         at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:278)
                                                                         at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:84)
                                                                         at com.ten.ten.ui.SplashActivity.onCreate(SplashActivity.java:83)
                                                                         at android.app.Activity.performCreate(Activity.java:6877)
                                                                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136)
                                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3208)
                                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3351)
                                                                         at android.app.ActivityThread.access$1100(ActivityThread.java:222)
                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1796)
                                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                         at android.os.Looper.loop(Looper.java:158)
                                                                         at android.app.ActivityThread.main(ActivityThread.java:7230)
                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
                                                                      Caused by: java.lang.ClassNotFoundException: Didn't find class "bolts.AppLinks" on path: DexPathList[[zip file "/data/app/com.ten.ten-1/base.apk", zip file "/data/app/com.ten.ten-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.ten.ten-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.ten.ten-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.ten.ten-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.ten.ten-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.ten.ten-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.ten.ten-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.ten.ten-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.ten.ten-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.ten.ten-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.ten.ten-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.ten.ten-1/lib/arm, /data/app/com.ten.ten-1/base.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_dependencies_apk.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_slice_0_apk.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_slice_1_apk.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_slice_2_apk.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_slice_3_apk.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_slice_4_apk.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_slice_5_apk.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_slice_6_apk.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_slice_7_apk.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_slice_8_apk.apk!/lib/armeabi-v7a, /data/app/com.ten.ten-1/split_lib_slice_9_apk.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.facebook.appevents.internal.SourceApplicationInfo$Factory.create(SourceApplicationInfo.java:131) 
                                                                         at com.facebook.appevents.internal.ActivityLifecycleTracker.onActivityCreated(ActivityLifecycleTracker.java:131) 
                                                                         at com.facebook.appevents.internal.ActivityLifecycleTracker$1.onActivityCreated(ActivityLifecycleTracker.java:77) 
                                                                         at android.app.Application.dispatchActivityCreated(Application.java:219) 
                                                                         at android.app.Activity.onCreate(Activity.java:1040) 
                                                                         at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:278) 
                                                                         at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:84) 
                                                                         at com.ten.ten.ui.SplashActivity.onCreate(SplashActivity.java:83) 
                                                                         at android.app.Activity.performCreate(Activity.java:6877) 
                                                                         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136) 
                                                                         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3208) 
                                                                         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3351) 
                                                                         at android.app.ActivityThread.access$1100(ActivityThread.java:222) 
                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1796) 
                                                                         at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                         at android.os.Looper.loop(Looper.java:158) 
                                                                         at android.app.ActivityThread.main(ActivityThread.java:7230) 
                                                                         at java.lang.reflect.Method.invoke(Native Method) 
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
                                                                        Suppressed: java.lang.ClassNotFoundException: bolts.AppLinks
                                                                         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)

我检查了该程序的其他版本代码,我遇到了同样的问题。这是我的build.gradle应用程序:

apply plugin: 'com.android.application'
apply plugin: 'realm-android'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'io.fabric'
apply plugin: 'me.tatarka.retrolambda'

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.1'

    defaultConfig {
        applicationId "com.tenmoji.tenmoji"
        minSdkVersion 16
        targetSdkVersion 25

        //for distribution by Beta
        versionCode 10000
        versionName "1.0.0.0"

        //for market distribution
//        versionCode 1
//        versionName "1.0.0"

        multiDexEnabled true
        manifestPlaceholders = [manifestApplicationId: "${applicationId}"]

        externalNativeBuild {
            cmake {
                cppFlags ""
            }
        }

//        manifestPlaceholders = [manifestApplicationId          : "${applicationId}",
//                                onesignal_app_id               : "9cd39d63-6c59-4f99-a823-192455ed3d5b",
//                                onesignal_google_project_number: "842188133226"]
    }
    buildTypes {
        release {
            minifyEnabled false
            jniDebuggable false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    retrolambda {
        jdk "/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home"
        oldJdk "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home"
        javaVersion JavaVersion.VERSION_1_7
        jvmArgs '-noverify'
        defaultMethods false
        incremental true
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }



    productFlavors {
        dev {
            // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
            // to pre-dex each module and produce an APK that can be tested on
            // Android Lollipop without time consuming dex merging processes.
            minSdkVersion 21
        }
        prod {
            minSdkVersion 16
        }
    }

    dexOptions {
        incremental = true;
        preDexLibraries = false
        javaMaxHeapSize "2g"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }

    lintOptions {
        checkReleaseBuilds false
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile fileTree(include: ['*.so'], dir: 'jniLibs')
    compile project(':emoji')
    compile project(path: ':aDA_B2NStudioExtension')

    testCompile 'junit:junit:4.12'

    compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
        transitive = true;
    }

    compile('com.digits.sdk.android:digits:2.0.3@aar') {
        transitive = true;
    }


    compile('com.facebook.android:facebook-android-sdk:[4,5)') {
        exclude module: 'bolts-android'
        exclude module: 'support-v4'
    }


    compile 'com.android.support:appcompat-v7:26.0.1'
    compile 'com.android.support:support-v4:26.0.1'
    compile 'com.android.support:recyclerview-v7:26.0.1'
    compile 'com.android.support:design:26.0.1'
    compile 'com.android.support:support-core-utils:26.0.1'
    compile 'com.android.support:support-annotations:26.0.1'
    compile 'com.android.support:percent:26.0.1'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.amazonaws:aws-android-sdk-core:2.+'
    compile 'com.amazonaws:aws-android-sdk-cognito:2.+'
    compile 'com.amazonaws:aws-android-sdk-s3:2.2.10'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.facebook.fresco:fresco:1.2.0'
    compile 'com.facebook.fresco:animated-gif:1.2.0'
    compile 'com.google.android.gms:play-services-gcm:11.0.4'
    compile 'com.google.android.gms:play-services-location:11.0.4'
    compile 'com.google.android.gms:play-services-analytics:11.0.4'
    compile 'com.wdullaer:materialdatetimepicker:2.3.0'
    compile 'org.parceler:parceler-api:1.1.1'
    compile 'org.apache.commons:commons-lang3:3.4'
    compile 'com.squareup.okhttp3:okhttp:3.2.0'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
    compile 'net.danlew:android.joda:2.9.3'
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.6'
    compile 'com.googlecode.libphonenumber:libphonenumber:7.3.1'
    compile 'org.greenrobot:eventbus:3.0.0'
    compile 'com.orhanobut:logger:1.15'
    compile 'com.pusher:pusher-java-client:1.4.0'
    compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+'
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    compile 'me.relex:photodraweeview:1.1.0'
    compile 'io.reactivex:rxandroid:1.2.0'
    compile 'io.reactivex:rxjava:1.1.5'
    compile 'com.trello:rxlifecycle:0.6.1'
    compile 'com.trello:rxlifecycle-components:0.6.1'
    compile 'com.vdurmont:emoji-java:3.1.3'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.wdullaer:materialdatetimepicker:2.3.0'
    compile 'com.github.zomato:androidphotofilters:1.0.1'
    compile 'com.github.clans:fab:1.6.4'
    compile 'com.firebaseui:firebase-ui-auth:2.3.0'
    compile 'com.google.firebase:firebase-messaging:11.0.4'

    apt 'org.parceler:parceler:1.1.1'

    apply plugin: 'com.google.gms.google-services'
}

我该如何调试?

2 个答案:

答案 0 :(得分:3)

我解决了删除bolt-android的排除块。

exclude module: 'bolts-android'

希望帮助另一个人!!

答案 1 :(得分:1)

删除exclude module行并不适合我。我必须明确声明对螺栓的依赖:

dependencies {
    compile 'com.parse.bolts:bolts-tasks:1.4.0'
    compile 'com.parse.bolts:bolts-applinks:1.4.0'
}