【问题标题】:why does INSTALL_PARSE_FAILED_MANIFEST_MALFORMED happens?为什么会发生 INSTALL_PARSE_FAILED_MANIFEST_MALFORMED?
【发布时间】:2019-12-07 05:13:28
【问题描述】:

我在运行我的应用程序后发生了这种情况: 包:/data/local/tmp/com.example.calculator.app 失败 [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

我可能删除或更改了某些内容,但我不知道是什么...

我的清单:

 <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.calculator.app" >

    <application

        android:icon="@drawable/studenticon128"
        android:label="@string/app_name"
        android:theme="@style/SelectedStyle" >
        <activity
            android:theme="@style/SelectedStyle"
            android:name="com.example.calculator.app.MainScreen"
            android:label="@string/app_name" >
            >
            <meta-data android:name="android.support.UI_OPTIONS"
                />
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>


        <activity

            android:uiOptions="splitActionBarWhenNarrow"
            android:name="com.example.calculator.app.Analysis"
            android:label="@string/app_name"

            android:parentActivityName="com.example.calculator.app.MainScreen">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.example.calculator.app.MainScreen"
                />
            <meta-data android:name="android.support.UI_OPTIONS"
                android:value="splitActionBarWhenNarrow"/>
            <intent-filter>
                <action android:name="android.intent.action.ANALYSIS" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>


    </application>

</manifest>

有人有什么想法吗?

【问题讨论】:

  • 粘贴你的 logcat ,看看是什么导致了这个错误

标签: android manifest


【解决方案1】:
<meta-data android:name="android.support.UI_OPTIONS"
            />

meta-data 需要 android:valueandroid:resource 属性。

【讨论】:

    【解决方案2】:

    您只需要从第一个活动中删除一个“>”

    【讨论】:

    • 我删除了 ">" 符号,但没有解决问题
    【解决方案3】:

    我最近遇到了这个问题,但这是元数据的问题,所以我所做的就是删除整个标签及其内容。查看我从下面的 Manifest.xml 文件中删除的内容。当我删除这个我的应用程序安装成功。

    <meta-data android:name"com.google.android.actions" />
    

    代码显示了我从 Manifest.xml 文件中删除的数据以解决问题。

    【讨论】:

    • 嗨@ShantaIE1,在你的答案中有一段代码总比一张图片好。
    猜你喜欢
    • 2015-09-23
    • 2013-02-17
    • 1970-01-01
    • 2017-07-20
    • 2017-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-02
    相关资源
    最近更新 更多