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

Play Store发布签名包失败,AndroidManifest相关报错求助

问题解决:Play Store发布aapt报错及AndroidManifest修复方案

1. 核心错误:android:label引用样式而非字符串资源

你遇到的第一个报错AndroidManifest.xml:49: error: ERROR getting 'android:label' attribute: attribute is not a string value,根源是GameOver Activity的android:label属性错误引用了样式资源。

看你的代码片段:

<activity
    android:name="com.dipsapplus.JUMP.GameOver"
    android:configChanges="orientation|keyboardHidden|screenSize"
    android:exported="false"
    android:label="@style/Theme.JUMP" <!-- 此处为错误代码 -->
    android:screenOrientation="landscape"
    android:theme="@style/Theme.JUMP.Fullscreen" />

android:label要求必须是字符串资源(格式为@string/xxx),不能是样式资源(@style/xxx)。

修复方法:

  • 方法一:将label改为已定义的字符串资源,比如和Application一致的@string/JUMP:
    android:label="@string/JUMP"
    
  • 方法二:如果该Activity不需要单独显示label,直接删除android:label属性,它会自动继承Application的label配置。

2. 解决aapt dump badging找不到AndroidManifest的问题

执行aapt dump badging时提示ERROR: dump failed because no AndroidManifest.xml found,是因为你没有指定正确的目标文件路径:

  • 检查打包后的APK:使用完整路径指向你的release APK文件:
    aapt dump badging /你的项目路径/build/outputs/apk/release/你的应用名-release.apk
    
  • 检查源码中的AndroidManifest:切换到android/app/src/main目录后执行命令,或者指定完整路径:
    aapt dump badging /你的项目路径/android/app/src/main/AndroidManifest.xml
    

后续验证步骤

  1. 修改AndroidManifest后,执行flutter clean清理缓存
  2. 重新构建release包:flutter build appbundle或flutter build apk --release
  3. 用aapt命令验证修复后的包,确认无报错后再上传到Play Store

内容的提问来源于stack exchange,提问作者Chiara Di Pasquale

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.15 20:10:29