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

升级Cordova和Android版本后,Play Store上传APK遇AndroidManifest.xml缺失错误

Cordova升级后APK上传Google Play失败:找不到AndroidManifest.xml

近期升级Cordova和Android版本后,无法将APK上传至Google Play Store,报错信息如下:

Failed to run aapt dump badging: ERROR: dump failed because no AndroidManifest.xml found

环境信息

  • macOS 11.6.4
  • Node.js v16.13.2
  • npm 8.1.2
  • Cordova 11.0.0
  • Android平台 11.0.0

已尝试操作

  • 找到位于platforms/android/app/src/main/AndroidManifest.xml的文件,复制到不同位置但无效果
  • 确认最终生成的APK内存在/base/manifest/AndroidManifest.xml,但VS Code无法正常显示其中的URL及特殊字符

构建脚本

#!/bin/bash

# Android构建

## 变量
buildfolder=~/Repos/app-cordova/platforms/android/app/build/outputs/bundle/release/
buildname=app-release.aab

rm $buildfolder/*;
cordova build android --release;
cd $buildfolder;
~/Library/Android/sdk/build-tools/30.0.3/zipalign -v -p 4 $buildname unsigned-aligned.apk;
~/Library/Android/sdk/build-tools/30.0.3/apksigner sign --ks ~/.private/app-release-key.jks --min-sdk-version 21 --out app.apk unsigned-aligned.apk;
open .;

构建日志

11.0.0
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: No custom version found in config.xml - using plugin default
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: No custom version found in config.xml - using plugin default
cordova-plugin-firebasex: Preparing Firebase on Android
Checking Java JDK and Android SDK versions
ANDROID_HOME=/Users/username/Library/Android/sdk (recommended setting)
ANDROID_SDK_ROOT=/Users/username/Library/Android/sdk (DEPRECATED)
Android build number incremented to "1213"
Saved in config.xml
Using Android SDK: /Users/username/Library/Android/sdk
Subproject Path: CordovaLib
Subproject Path: app

> Configure project :app
+-----------------------------------------------------------------
| cordova-android-support-gradle-release: 27.+
+-----------------------------------------------------------------
strippedNativeLibsDir is deprecated and no longer used. Please remove it from your build configuration.

> Task :app:preBuild UP-TO-DATE
[....]
> Task :app:bundleRelease

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 8s
62 actionable tasks: 17 executed, 45 up-to-date
Built the following bundle(s): 
    /Users/username/Repos/projectname/platforms/android/app/build/outputs/bundle/release/app-release.aab
Verifying alignment of unsigned-aligned.apk (4)...
      54 BundleConfig.pb (OK - compressed)
     440 BUNDLE-METADATA/com.android.tools.build.libraries/dependencies.pb (OK - compressed)
    8870 BUNDLE-METADATA/com.android.tools.build.gradle/app-metadata.properties (OK - compressed)
    9002 base/assets/www/cordova.js (OK - compressed)
   26034 base/assets/www/cordova_plugins.js (OK - compressed)
   27165 base/assets/www/css/app.css (OK - compressed)
[....]
12019277 base/manifest/AndroidManifest.xml (OK - compressed)
12024496 base/assets.pb (OK - compressed)
12024922 base/native.pb (OK - compressed)
12025058 base/resources.pb (OK - compressed)
Verification succesful
Keystore password for signer #1: 
^c

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.07 18:01:01