当前位置: 首页 > 知识库问答 >
问题:

Android应用程序在迁移到androidx后停止在API 21之前工作

叶鸿
2023-03-14

我已经将我们的项目迁移到androidx,现在该应用程序在API21及以上版本上运行,但在API21及以上版本下无法运行。这款应用正在使用multidexing,之前也一直在使用,运行良好。现在我只是得到一个致命的信号11和没有更多有用的日志时,应用程序崩溃。该系统在空气污染指数21或以上时仍然运作良好。你有什么线索或暗示我如何更接近解决这个问题吗?

10-19 15:16:01.024 11813-11813/com.mycompany.myproduct /libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 11813 ()
10-19 15:16:01.964 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'android.app.job.JobScheduler', referenced from method com.google.android.gms.internal.measurement.zzcc.cancel
10-19 15:16:01.964 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'android.app.job.JobScheduler', referenced from method com.google.android.gms.internal.measurement.zzcc.zzen
10-19 15:16:01.984 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'com.evernote.android.job.v21.PlatformJobService', referenced from method com.evernote.android.job.JobApi.isSupported
10-19 15:16:01.984 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'com.evernote.android.job.v21.PlatformJobService', referenced from method com.evernote.android.job.JobApi.isSupported
10-19 15:16:01.984 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'com.evernote.android.job.v21.PlatformJobService', referenced from method com.evernote.android.job.JobApi.isSupported
10-19 15:16:01.994 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'androidx.core.app.JobIntentService$JobServiceEngineImpl', referenced from method androidx.core.app.JobIntentService.onCreate
10-19 15:16:02.014 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'android.app.NotificationChannel', referenced from method io.intercom.android.sdk.push.SystemNotificationManager.setUpNotificationChannels
10-19 15:16:02.104 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper', referenced from method androidx.core.view.ViewCompat.addOnUnhandledKeyEventListener
10-19 15:16:02.104 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method androidx.core.view.ViewCompat.dispatchApplyWindowInsets
10-19 15:16:02.104 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method androidx.core.view.ViewCompat.onApplyWindowInsets
10-19 15:16:02.104 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'android.view.View$OnUnhandledKeyEventListener', referenced from method androidx.core.view.ViewCompat.removeOnUnhandledKeyEventListener
10-19 15:16:02.114 11902-11902/com.mycompany.myproduct E/dalvikvm: Could not find class 'androidx.core.view.ViewCompat$1', referenced from method androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener
10-19 15:16:02.804 11979-11979/? E/memtrack: Couldn't load memtrack module (No such file or directory)
10-19 15:16:02.804 11979-11979/? E/android.os.Debug: failed to load memtrack module: -2
10-19 15:16:03.104 2366-2734/com.google.android.gms.persistent E/NetworkScheduler: Unrecognised action provided: android.intent.action.PACKAGE_REPLACED
10-19 15:16:03.354 11902-11902/com.mycompany.myproduct A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 11902 ()



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


    dependencies {
        classpath 'io.fabric.tools:gradle:1.26.1'
        classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
        classpath 'com.netflix.nebula:gradle-lint-plugin:9.3.4'

    }
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'
apply plugin: 'com.jakewharton.hugo'




repositories {
    maven() {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }
    maven {
        url 'https://maven.fabric.io/public'
    }
    maven {
        url 'https://dl.bintray.com/intercom/intercom-maven'
    }
    maven {
        url "https://maven.google.com"
    }

    mavenCentral()
    maven { url "https://jitpack.io" }

}

android {

    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    testOptions {
        unitTests {
            includeAndroidResources = true
        }
    }
    lintOptions {
        //checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }
    defaultConfig {
        applicationId "com.mycompany.myproduct"
        minSdkVersion 16
        targetSdkVersion 28

        versionCode 1
        versionName "1.0"

        renderscriptTargetApi 28
        renderscriptSupportModeEnabled true
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true

        testOptions {
            unitTests.returnDefaultValues = true
        }

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            resValue "bool", "branch_test", "false"
            resValue "string", "intercom_gcm_sender_id", "xxx"
        }
        debug {
            resValue "bool", "branch_test", "true"
            resValue "string", "intercom_gcm_sender_id", "xxx"
        }
    }

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
        disable 'RestrictedApi'

    }

    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    def lifecycle_version = "2.0.0"
    def paging_version = "2.0.0"

    // ViewModel and LiveData
    implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
    implementation "androidx.paging:paging-runtime:$paging_version"

    testImplementation 'junit:junit:4.12'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    releaseImplementation project(':library')
    debugImplementation project(':library')
    releaseImplementation project(':countrypicker')
    debugImplementation project(':countrypicker')
    implementation project(':amazon-maps-api-v2')
    releaseImplementation project(':tourguide')
    debugImplementation project(':tourguide')
    releaseImplementation project(':fullscreenimageslider')
    debugImplementation project(':fullscreenimageslider')
    implementation files('libs/libphonenumber-7.2.5.jar')
    implementation('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
        transitive = true
    }
    testImplementation 'org.mockito:mockito-core:1.10.19'
    implementation('io.branch.sdk.android:library:2.+') {
        exclude module: 'answers-shim'
    }
    implementation 'com.thoughtbot:expandablerecyclerview:1.3'
    annotationProcessor 'com.airbnb:deeplinkdispatch-processor:3.1.1'
    implementation 'com.airbnb:deeplinkdispatch:3.1.1'
    implementation 'io.github.luizgrp.sectionedrecyclerviewadapter:sectionedrecyclerviewadapter:1.0.4'
    implementation 'com.google.firebase:firebase-core:16.0.4'
    implementation 'com.google.firebase:firebase-messaging:17.3.4'
    implementation 'com.google.android.gms:play-services-places:16.0.0'
    implementation 'com.google.android.gms:play-services-maps:16.0.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.google.android.gms:play-services-analytics:16.0.4'
    implementation 'com.google.maps.android:android-maps-utils:0.5'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'


    implementation 'com.squareup.picasso:picasso:2.6.0-SNAPSHOT'
    implementation 'com.squareup.okhttp3:okhttp:3.11.0'
    implementation 'com.squareup.okio:okio:1.14.0'
    implementation 'com.mcxiaoke.volley:library:1.0.19'
    implementation 'com.parse:parse-livequery-android:1.0.3', {
        exclude group: 'com.parse', module: 'parse-android'
    }
    implementation "com.github.parse-community.Parse-SDK-Android:parse:1.18.5"
    implementation "com.github.parse-community.Parse-SDK-Android:gcm:1.18.5"
    //implementation "com.parse:parse-android:1.16.7"
    implementation "com.github.parse-community.Parse-SDK-Android:ktx:1.18.5"

    implementation 'com.timehop.stickyheadersrecyclerview:library:0.4.1@aar'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'de.hdodenhof:circleimageview:1.3.0'
    implementation 'jp.wasabeef:recyclerview-animators:2.0.1'
    implementation 'it.sephiroth.android.library.imagezoom:imagezoom:2.2.4'
    implementation 'com.mixpanel.android:mixpanel-android:4.6.4'
    implementation 'androidx.multidex:multidex:2.0.0'
    implementation 'com.github.paolorotolo:appintro:3.4.0',{
        exclude group: 'com.android.support', module: 'appcompat-v7'
        exclude group: 'com.android.support', module: 'design'
        exclude group: 'com.android.support', module: 'gridlayout-v7'
    }
    implementation 'com.zhy:flowlayout-lib:1.0.3'
    implementation 'testfairy:testfairy-android-sdk:1.+@aar'
    implementation 'io.intercom.android:intercom-sdk-base:5.+',
    {
        exclude group: 'com.android.support', module: 'appcompat-v7'
        exclude group: 'com.android.support', module: 'design'
        exclude group: 'com.android.support', module: 'gridlayout-v7'
    }
    implementation 'io.intercom.android:intercom-sdk-fcm:5.+'
    implementation 'com.google.guava:guava:24.1-jre'
    testImplementation 'junit:junit:4.12'
    testImplementation 'org.mockito:mockito-core:1.10.19'
    testImplementation 'org.robolectric:robolectric:3.3'
    testImplementation 'org.robolectric:shadows-multidex:3.3'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'org.slf4j:slf4j-android:1.7.25'

    implementation 'com.apollographql.apollo:apollo-runtime:0.4.3'
    implementation 'com.apollographql.apollo:apollo-android-support:0.4.3'
    implementation 'com.apollographql.apollo:apollo-http-cache:0.4.3'
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.retrofit2:converter-jackson:2.3.0'

    implementation 'com.philliphsu:bottomsheetpickers:2.4.1' ,{
        exclude group: 'com.android.support', module: 'appcompat-v7'
        exclude group: 'com.android.support', module: 'design'
        exclude group: 'com.android.support', module: 'gridlayout-v7'
    }
    implementation group: 'com.cloudinary', name: 'cloudinary-android', version: '1.24.0'

}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.apollographql.android'
apply plugin: 'kotlin-android-extensions'

共有1个答案

谢学名
2023-03-14

谢谢SSO,技术人员!所以是的,问题是渲染脚本...我做了与本链接中描述的相同的操作。但是我必须围绕renderscript构建兼容性,因为这个解决方案在API23之前已经不能工作了。我仍然希望找到一个使用renderscript的新支持版本的解决方案

 类似资料:
  • 我们的webstart应用程序(不是小程序)遇到了奇怪的启动问题。 启动应用程序会显示应用程序启动屏幕,但javaws进程会在不久后终止,不会在对话框、java控制台或日志文件中显示任何错误消息。javaws似乎只是在实际启动实际应用程序之前停止。无论用户尝试从桌面快捷方式还是从网页启动应用程序,都无关紧要。当从本地计算机使用javaw运行而无需webstart时,相同的应用程序可以正常工作。 应

  • 我正试图迁移到AndroidX,我们在我们的项目中使用这个库。然而,这目前在我们的项目中引起了一个问题: 无法解析对“module @ build type/compile class path”的依赖项:无法使用转换JetifyTransform转换文件“localytics-1.3.0.aar”以匹配属性{artifactType=processed-aar} 删除库会使此问题消失。在这个库被

  • 本文向大家介绍Android AndroidX的迁移,包括了Android AndroidX的迁移的使用技巧和注意事项,需要的朋友参考一下 1. 前言 AndroidX replaces the original support library APIs with packages in the androidx namespace. Only the package and Maven arti

  • 问题内容: 我正在尝试迁移到androidx。我在Android Studio中使用了迁移工具。当我执行此操作时,我在运行应用程序时得到以下堆栈跟踪。 例外是正确的。android.support.v4.content.FileProvider在我的应用中不存在。但是androidx.core.content.FileProvider包含在我的应用程序中。最大的问题是为什么它要加载旧版本的File