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

求助:模拟应用时反复出现install_parse_failed_manifest_malformed错误

Troubleshooting install_parse_failed_manifest_malformed After Fixing Package Name Case

Hey there, let's tackle this stubborn install_parse_failed_manifest_malformed error you're facing—fixing the package name to lowercase was a good first step, but there are plenty of other Manifest issues that can trigger this error. Let's break down the most likely culprits and how to fix them:

Common Causes & Fixes

1. Incomplete or Malformed Manifest Tags

Your provided code snippet cuts off mid-android:roundIcon attribute, which is a red flag. Manifest files require all tags to be properly closed and attributes to have complete values. For example:

  • Ensure the roundIcon resource reference is fully written (e.g., @mipmap/ic_launcher_round instead of @mipmap/ic_launch...)
  • Double-check that the <application> tag has a corresponding </application> closing tag, and the root <manifest> tag is properly closed at the end of the file.

2. Invalid Attribute Values or Typos

Even small typos can break Manifest parsing:

  • Verify attribute names are correctly cased (e.g., android:allowBackup not android:allowBackUp—Android is case-sensitive here)
  • Ensure resource references like @string/app_name exist in your strings.xml file, and @mipmap/ic_launcher has matching drawable resources in your project.

3. Missing Required Attributes (Android 12+)

If your app targets Android 12 (API level 31) or higher, components like <activity>, <service>, and <receiver> must include the android:exported attribute (set to true or false). Omitting this will trigger a parse failure. Example:

<activity
    android:name=".MainActivity"
    android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

4. Invalid SDK Version Declarations

Check that minSdkVersion, targetSdkVersion, and compileSdkVersion (in your build.gradle file) are valid integers, not strings or invalid values. For example, avoid wrapping version numbers in quotes like "23"—use 23 instead.

Debugging Tools to Pinpoint the Issue

  • Android Studio Manifest Editor: Open your AndroidManifest.xml in Android Studio—it will highlight syntax errors with red underlines and provide quick fixes.
  • AAPT Command: Run this command in your terminal to get detailed parse error messages:
    aapt dump badging path/to/your/app.apk
    
    This will show exactly where the Manifest parsing failed, which is often more specific than the generic error message you're seeing.

Start by fixing the truncated roundIcon attribute and ensuring all tags are closed—those are the most obvious issues in your snippet. If that doesn't work, use the AAPT command to get precise error details.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.20 11:28:58