java - 发射时的致命信号 (KitKat)

标签 java android libc

我在 KitKat 上收到以下错误,但在 Android M 及更高版本上没有问题:

2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'com.crashlytics.android.ndk.CrashlyticsNdk', referenced from method com.crashlytics.android.CrashlyticsInitProvider.createCrashlyticsKits
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'com.evernote.android.job.v21.PlatformJobService', referenced from method com.evernote.android.job.JobApi.isSupported
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'com.evernote.android.job.v21.PlatformJobService', referenced from method com.evernote.android.job.JobApi.isSupported
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'com.evernote.android.job.v21.PlatformJobService', referenced from method com.evernote.android.job.JobApi.isSupported
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'androidx.core.app.JobIntentService$JobServiceEngineImpl', referenced from method androidx.core.app.JobIntentService.onCreate
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'androidx.core.view.ViewCompat$2', referenced from method androidx.core.view.ViewCompat.addOnUnhandledKeyEventListener
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method androidx.core.view.ViewCompat.dispatchApplyWindowInsets
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method androidx.core.view.ViewCompat.onApplyWindowInsets
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'android.view.View$OnUnhandledKeyEventListener', referenced from method androidx.core.view.ViewCompat.removeOnUnhandledKeyEventListener
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'androidx.core.view.ViewCompat$1', referenced from method androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method androidx.appcompat.widget.AppCompatImageHelper.hasOverlappingRendering
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'android.view.textclassifier.TextClassificationManager', referenced from method androidx.appcompat.widget.AppCompatTextClassifierHelper.getTextClassifier
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method co.ronash.pushe.Pushe.a
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'android.app.job.JobScheduler', referenced from method co.ronash.pushe.Pushe.a
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method co.ronash.pushe.Pushe.createNotificationChannel
2145-2145/com.cafeapps.stroydownloader E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method com.google.android.material.tabs.TabLayout$TabView.updateBackgroundDrawable
2145-2145/com.cafeapps.stroydownloader A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=128), thread 2145 (stroydownloader)

而且我认为唯一的错误是最后一行,因为其余的都可以忽略。 这是我的 build.gradle:

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.cafeapps.stroydownloader"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        defaultConfig.vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }
    productFlavors {
        ....
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'

    implementation 'com.libizo:customedittext:1.0.6'
    implementation 'com.github.sabujak-sabujak:RoundedButton:v0.1.1'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.1.0'
    implementation 'org.jsoup:jsoup:1.12.1'
    implementation 'com.hmomeni.progresscircula:progresscircula:0.2.1'
    implementation 'com.github.alirezat775:downloader:1.0.0'
    implementation 'android.arch.persistence.room:runtime:1.1.1'
    annotationProcessor 'android.arch.persistence.room:compiler:1.1.1'
    implementation 'com.github.ybq:Android-SpinKit:1.2.0'
    implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
    implementation 'io.reactivex.rxjava2:rxjava:2.2.6'
    implementation 'com.github.halilozercan:BetterVideoPlayer:1.2.alpha1'
    implementation 'com.github.chrisbanes:PhotoView:2.1.4'
    implementation 'com.github.florent37:viewtooltip:1.2.2'


    //Ads , firebase , ....

    implementation 'com.google.android.gms:play-services-ads:16.4.1'
    implementation 'com.google.firebase:firebase-ads:17.2.0'
    implementation 'com.google.firebase:firebase-config:16.1.3'
    implementation 'com.google.firebase:firebase-auth:16.1.0'
    implementation 'com.google.android.ads.consent:consent-library:1.0.6'
    implementation 'co.ronash.android:pushe-base:1.6.3'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    implementation 'ir.tapsell.sdk:tapsell-sdk-android:4.3.3'
    implementation 'androidx.multidex:multidex:2.0.1'

}

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

我已经意识到(使用 Debug模式)我的主要 Activity 和我的两个 fragment 都是在崩溃之前创建的。任何帮助将不胜感激。

最佳答案

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.cafeapps.stroydownloader">

    <application
        ....
        android:hardwareAccelerated="false">
        .....
    </application>

</manifest>

AndroidManifest.xml 中禁用 hardwareAcceleration 解决了我的问题。

关于java - 发射时的致命信号 (KitKat),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57044777/

相关文章:

linker - 进程链接是否仍会在 libc.a 中加载 o 文件?

java - 从 PHP 到 Java。有什么建议吗?

java - 使用系统证书签署 apk

android - 编辑 android init.rc 以重新启动第三方守护进程

java - Android - 从 Intent 过滤器解析短网址

c++ - -错误=格式: how can the compiler know

android - genymotion 模拟器上的致命信号 11 (SIGSEGV) 代码=2 不使用 NDK

javax 父子之间的持久关系。最后一个 child 又是另一个 child 的 parent

java - 检索用户名 :Password Sent by Curl with Spring Boot

1490086 字节的 Android 错误 : I/dalvikvm-heap: Grow heap (frag case) to 16. 159MB