如何在我的 android 应用程序中修复 INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
您好,我正在尝试使用 gcm,但无法使其正常工作.不知道我在哪里弄乱它,下面是我得到的错误.我正在尝试直接在设备上部署我的应用程序并从那里进行调试,但是当我尝试部署它时会出现此错误
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:DataAndroidAndroidTestoutproductionAndroidTestAndroidTest.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>
我的设备是 HTC OneX
- 安卓版本:4.03
- HTC Sense 版本:4.0
- 软件编号:1.29.110.11
- HTC SDK API 级别:4.12
- HTC 扩展版本:HTCExtension_403_1_GA_7
由于我是Android Sea的新鱼,请指导.
Please guide as I am new fish in Android Sea.
编辑-1:我注意到,如果我在下面发表评论,那么应用程序确实会部署并执行,但显然如果没有下面提到的许可,我就无法继续......请帮助......
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.
相关文章