Hi, I am trying to experiment with gcm but cannot make it work. I donโt know where I was messing with him, below is the mistake I get. I try to deploy my application directly on the device and debug from there, but when I try to deploy it, 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 me as a new fish in Android Sea.
Edit-1: I noticed that if I comment on this line below, the application expands and executes, but obviously I cannot go forward without permission below ... please help ....
<permission android:name="Android.Test.permission.C2D_MESSAGE" android:protectionLevel="signature" />
java android android-emulator android-manifest google-cloud-messaging
Shax Sep 12 2018-12-12T00: 00Z
source share