You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google签名APK在Android 12L设备上崩溃问题求助

Android 12L设备Google签名APK崩溃问题解决记录

问题现象

  • 预发布阶段的Google签名APK在Android 12L设备上启动后立即崩溃,弹出带错误信息的黑色窗口;本地构建的debug、release包无此问题
  • 普通手机/平板设备运行正常,涉事Android 12L设备未安装Google Play商店
  • 全新平板设备完成Google账号配置后可正常使用应用
  • Firebase Crashlytics未捕获到该崩溃报告

错误日志

执行adb logcat *:E获取到以下关键错误:

01-11 15:51:08.447   363   562 E android.hardware.audio@7.0-impl.ranchu: device/generic/goldfish/audio/stream_out.cpp:updateSourceMetadata:388 failure: Result::NOT_SUPPORTED
01-11 15:51:08.584   363   562 E android.hardware.audio@7.0-impl.ranchu: device/generic/goldfish/audio/stream_out.cpp:updateSourceMetadata:388 failure: Result::NOT_SUPPORTED
01-11 15:51:08.818 13199 13248 E LicenseClient: Error while checking license: com.pairip.licensecheck.LicenseCheckException: Licensing service could not process request.
01-11 15:51:08.818 13199 13248 E LicenseClient:         at com.pairip.licensecheck.LicenseClient.checkLicenseInternal(LicenseClient.java:166)
01-11 15:51:08.818 13199 13248 E LicenseClient:         at com.pairip.licensecheck.LicenseClient.lambda$onServiceConnected$0(LicenseClient.java:131)
01-11 15:51:08.818 13199 13248 E LicenseClient:         at com.pairip.licensecheck.LicenseClient.$r8$lambda$xzrAfByzooHDT9oIsgTdQvzthuE(Unknown Source:0)
01-11 15:51:08.818 13199 13248 E LicenseClient:         at com.pairip.licensecheck.LicenseClient$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
01-11 15:51:08.818 13199 13248 E LicenseClient:         at java.lang.Thread.run(Thread.java:920)

同时出现库文件缺失错误:

java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'libflutter.so'. Looked for: [arm64-v8a, armeabi-v7a, armeabi], but only found: []

原项目build.gradle配置(release构建类型)

buildTypes {
    debug {
        signingConfig signingConfigs.debug
    }
    release {
        signingConfig signingConfigs.release
        minifyEnabled false
        shrinkResources false
        proguardFiles getDefaultProguardFile(
                'proguard-android-optimize.txt'),
                'proguard-rules.pro'
        ndk {
            debugSymbolLevel 'FULL'
        }
    }
}

解决方案

在release构建类型的ndk配置中添加abiFilters,明确指定应用支持的ABI架构:

buildTypes {
    debug {
        signingConfig signingConfigs.debug
    }
    release {
        signingConfig signingConfigs.release
        minifyEnabled false
        shrinkResources false
        proguardFiles getDefaultProguardFile(
                'proguard-android-optimize.txt'),
                'proguard-rules.pro'
        ndk {
            debugSymbolLevel 'FULL'
            abiFilters "armeabi-v7a", "arm64-v8a", "x86_64"
        }
    }
}

添加该配置后,libflutter.so缺失问题解决,同时Android 12L设备上的崩溃问题也一并消失。

问题分析

  1. 核心崩溃原因是Google签名APK构建时未包含目标Android 12L设备对应的ABI架构库文件,导致libflutter.so加载失败引发崩溃;
  2. 涉事设备未安装Google Play商店导致License校验失败,但该错误并非崩溃触发点,解决ABI适配后,License相关错误未引发崩溃(推测代码中存在容错处理逻辑)。

内容的提问来源于stack exchange,提问作者atg

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.15 02:43:12