安装错误:Android中的INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

时间:2015-11-29 19:14:08

标签: android installation

我正在尝试构建一个应用程序并不断收到此错误,我似乎无法做任何事情:

  

安装错误:INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

Android清单如下:

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

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="23" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".Home"
            android:label="@string/app_name" >

            <!-- First screen to load start -->
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <!-- First screen to load end -->
        </activity>
        <activity
            android:name=".Profile"
            android:label="@string/title_activity_profile" >
        </activity>
        <activity
            android:name=".LoginActivity"
            android:label="@string/title_activity_login"
            android:windowSoftInputMode="adjustResize|stateHidden" >
        </activity>

        <meta-data />

        <activity
            android:name=".Login"
            android:label="@string/title_activity_login" >
        </activity>
        <activity
            android:name=".Paramedic"
            android:label="@string/title_activity_paramedic" >
        </activity>
    </application>
    <!-- To access Google+ APIs: -->
    <uses-permission android:name="android.permission.INTERNET" />

    <!--
     To retrieve OAuth 2.0 tokens or invalidate tokens to disconnect a user. This disconnect
     option is required to comply with the Google+ Sign-In developer policies




    -->
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />

    <!-- To retrieve the account name (email) as part of sign-in: -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />

    <!-- To auto-complete the email text field in the login form with the user's emails -->
    <uses-permission android:name="android.permission.READ_PROFILE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />

</manifest>

2 个答案:

答案 0 :(得分:1)

删除

<meta-data />

meta-data元素必须包含android:name以及android:valueandroid:resource

答案 1 :(得分:0)

作为参考(除了laalto的答案),如果您使用的是Android Studio,则值得查看“消息/ Gradle控制台”标签,因为它可能包含有关&#39的线索这个问题。在你的情况下,你可能已经看到过类似的东西:

  

缺少姓名&#39; AndroidManifest.xml上元素元数据的关键属性:37:9-22

enter image description here