如何解决INSTALL_PARSE_FAILED_MANIFEST_MALFORMED在我的Andr​​oid应用程序 [英] How to fix INSTALL_PARSE_FAILED_MANIFEST_MALFORMED in my android application

查看:146
本文介绍了如何解决INSTALL_PARSE_FAILED_MANIFEST_MALFORMED在我的Andr​​oid应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我想尝试GCM,但不能使它工作。不知道我在哪里玩弄它,下面是我得到的错误。我想直接在设备和调试从那里部署我的应用程序,但是当我曾经尝试部署它给这个错误

 等待设备。
目标设备:HT24LW108632
上传文件
    本地路径:D:\ DATA \机器人\ AndroidTest \出\生产\ AndroidTest \ AndroidTest.apk
    远程路径:/data/local/tmp/Android.Test
安装Android.Test
设备的外壳命令:下午安装-r/data/local/tmp/Android.Test
PKG:/data/local/tmp/Android.Test
失败[INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
 

AndroidManifest.xml中

 < XML版本=1.0编码=UTF-8&GT?;
<舱单的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
          包=Android.Test
          安卓版code =1
          机器人:VERSIONNAME =1.0>
    <使用-SDK安卓的minSdkVersion =14/>

    <许可
            机器人:名称=Android.Test.permission.C2D_MESSAGE
            安卓的ProtectionLevel =签名/>
    <使用-权限的Andr​​oid:名称=Android.Test.permission.C2D_MESSAGE/>
    <使用-权限的Andr​​oid:名称=android.permission.GET_ACCOUNTS/>
    <使用-权限的Andr​​oid:名称=android.permission.WAKE_LOCK/>
    <使用-权限的Andr​​oid:名称=android.permission.INTERNET对/>
    <使用-权限的Andr​​oid:名称=com.google.android.c2dm.permission.RECEIVE/>



    <应用机器人:标签=@字符串/ APP_NAME机器人:图标=@可绘制/ ic_launcher>
        <活动机器人:名称=MainActivity
                  机器人:标签=@字符串/ APP_NAME>
            <意向滤光器>
                <作用机器人:名称=android.intent.action.MAIN/>
                <类机器人:名称=android.intent.category.LAUNCHER/>
            &所述; /意图滤光器>
        < /活性GT;
        <接收器
                机器人:名称=com.google.android.gcm.GCMBroadcastReceiver
                机器人:权限=com.google.android.c2dm.permission.SEND>
            <意向滤光器>
                <作用机器人:名称=com.google.android.c2dm.intent.RECEIVE/>
                <作用机器人:名称=com.google.android.c2dm.intent.REGISTRATION/>

                <类机器人:名称=Android.Test/>
            &所述; /意图滤光器>
        < /接收器>
        <服务机器人。GCMIntentServiceNAME = />
    < /用途>
< /舱单>
 

我的设备是HTC ONEX

  • Android版本:4.03
  • 的HTC Sense版本:4.0
  • 软件数量:1.29.110.11
  • HTC SDK API级别:4.12
  • HTC扩展版本:HTCExtension_403_1_GA_7

请指导我在Android的海是新的鱼。

编辑 - 1: 我注意到,如果我评论这下面的行,然后应用程序部署和执行,但很明显,我不能去直接使用,无需下面提到的许可......请帮助....

 <允许机器人:名称=Android.Test.permission.C2D_MESSAGE安卓的ProtectionLevel =签名/>
 

解决方案

更​​改名称包帽字母简单的字母。

Hi I am trying to experiment with gcm but unable to make it work. Don't know where I am messing with it, below is the error I am getting. I am trying to deploy my application directly on device and debug from there but when ever I try to deploy it gives this error

Waiting for device.
Target device: HT24LW108632
Uploading file
    local path: D:\Data\Android\AndroidTest\out\production\AndroidTest\AndroidTest.apk
    remote path: /data/local/tmp/Android.Test
Installing Android.Test
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/Android.Test"
pkg: /data/local/tmp/Android.Test
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="Android.Test"
          android:versionCode="1"
          android:versionName="1.0">
    <uses-sdk android:minSdkVersion="14"/>

    <permission
            android:name="Android.Test.permission.C2D_MESSAGE"
            android:protectionLevel="signature" />
    <uses-permission android:name="Android.Test.permission.C2D_MESSAGE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />



    <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
        <activity android:name="MainActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <receiver
                android:name="com.google.android.gcm.GCMBroadcastReceiver"
                android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

                <category android:name="Android.Test" />
            </intent-filter>
        </receiver>
        <service android:name=".GCMIntentService" />
    </application>
</manifest>

My Device is HTC OneX

  • Android Version: 4.03
  • HTC Sense Version: 4.0
  • Software number: 1.29.110.11
  • HTC SDK API Level: 4.12
  • HTC Extension version: HTCExtension_403_1_GA_7

Please guide as I am new fish in Android Sea.

Edit-1: I have noticed that if I comment this below line then application does deploy and execute but obviously I cant go forward without below mentioned permission ... please help....

<permission android:name="Android.Test.permission.C2D_MESSAGE"  android:protectionLevel="signature" />

解决方案

Change name package with Caps letters to little letters.

这篇关于如何解决INSTALL_PARSE_FAILED_MANIFEST_MALFORMED在我的Andr​​oid应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆