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

Android Studio生成签名App Bundle时无法生成Native调试符号

Native调试符号生成异常问题

问题现象

  • 在Android Studio中执行Generate signed app bundle操作时,intermediates/merged_native_libs目录及最终生成的App Bundle中均未生成Native调试符号
  • 尝试删除build.gradle.kts中的ndkVersion指定项,问题仍未解决

特殊现象

引入以下依赖后,intermediates/merged_native_libs目录中会生成Native调试符号,但这些符号仍无法在App Bundle中被访问:

implementation("androidx.compose.material:material:1.7.0-alpha01")

环境与配置

已安装与build.gradle.kts中版本一致的NDK(版本号22.1.7171670)及CMake,相关配置如下:

android {
    namespace = "com.myspeechy.myspeechy"
    compileSdk = 34
    ndkVersion = "22.1.7171670"

    defaultConfig {
        applicationId = "com.myspeechy.myspeechy"
        minSdk = 26
        targetSdk = 34
        versionCode = 11
        versionName = "1.0.11"
        testInstrumentationRunner = "com.myspeechy.myspeechy.CustomTestRunner"
        vectorDrawables {
            useSupportLibrary = true
        }
        ksp {
            arg("room.schemaLocation", "$projectDir/schemas")
        }
        resourceConfigurations.addAll(listOf("en"))
    }

    buildTypes {
        release {
            ndk {
                debugSymbolLevel = "FULL"
            }
            isShrinkResources = true
            isMinifyEnabled = true
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    // ... 其他省略配置
}

dependencies {
    implementation("androidx.activity:activity-compose:1.8.2")
    implementation("androidx.navigation:navigation-compose:2.7.7")
    implementation("androidx.core:core-ktx:1.12.0")
    implementation(platform("androidx.compose:compose-bom:2023.08.00"))
    implementation("androidx.compose.ui:ui")
    implementation("androidx.compose.ui:ui-graphics")
    implementation("androidx.compose.ui:ui-tooling-preview")
    implementation("androidx.compose.material3:material3")
    // 该行依赖会触发目录生成Native调试符号
    implementation("androidx.compose.material:material:1.7.0-alpha01")
}

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.24 00:24:51