嘿,我无法理解为什么我会收到这个错误,它可能与GCM的东西有关,因为它在我添加之后就停止了工作......我的包名已经是小写的,我认为这是主要的解决方案遍。
这是我的代码:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lior.winklio">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- for google cloud messaging -->
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!--
Creates a custom permission so only this app can receive its messages.
NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,
where PACKAGE is the application's package name.
-->
<permission android:name="com.example.lior.winklio.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.google.android.gcm.demo.app.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive data message. -->
<uses-permission
android:name="com.google.android.c2dm.permission.RECEIVE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
<!--google play services-->
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<!--
WakefulBroadcastReceiver that will receive intents from GCM
services and hand them to the custom IntentService.
The com.google.android.c2dm.permission.SEND permission is necessary
so only GCM services can send data messages for the app.
CHANGING ANDROID NAME FOR TUTORIAL FROM GcmBroadcastReceiver to MSGReciever
and GcmIntentService
-->
<receiver
android:name=".Modular.MSGReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example.lior.winklio" />
</intent-filter>
</receiver>
<service android:name="Modular.MSGService" />
<activity
android:name="com.example.lior.winklio.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>
<!-- Chat Activity -->
<activity android:name=".ChatActivity"
android:launchMode="singleTask"
android:label="@string/app_name" />
<!-- Login Activity -->
<activity
android:name=".StarterActivity"
android:label="Winklio" >
</activity>
<activity
android:name="com.facebook.LoginActivity"
android:label="Winklio" >
</activity>
</application>
</manifest>
错误:
Installing com.example.lior.winklio
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.lior.winklio"
pkg: /data/local/tmp/com.example.lior.winklio
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]