安装Android应用程序时出错

时间:2012-07-04 07:53:51

标签: android android-c2dm

我尝试在我的Android应用程序中使用C2DM,但在我添加它之后我无法安装该应用程序。我收到此错误“安装错误:INSTALL_PARSE_FAILED_MANIFEST_MALFORMED”。但是我看不出什么是错的。

任何知道我做错了什么的人?

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="Wordy.Game"
          android:versionCode="1"
          android:versionName="0.1"
          android:installLocation="preferExternal">
          <uses-sdk android:minSdkVersion="8" />

          <permission
            android:name="Wordy.Game.permission.C2D_MESSAGE" android:protectionLevel="signature" />
          <uses-permission 
            android:name="Wordy.Game.permission.C2D_MESSAGE" />
            <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

          <uses-permission android:name="android.permission.INTERNET"/>
          <uses-permission android:name="android.permission.VIBRATE"/>
          <uses-permission android:name="android.permission.GET_ACCOUNTS" />

        <application android:label="@string/app_name" android:icon="@drawable/wordy">
            <activity android:name="Main"
                      android:label="@string/app_name" android:screenOrientation="portrait">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <receiver
                android:name=".C2DMRegistrationReceiver"
                android:permission="com.google.android.c2dm.permission.SEND" >
                <intent-filter >
                    <action android:name="com.google.android.c2dm.intent.REGISTRATION" >
                    </action>
                    <category android:name="Wordy.Game" />
                </intent-filter>            
            </receiver>
             <receiver
                android:name=".C2DMRegistrationReceiver"
                android:permission="com.google.android.c2dm.permission.SEND" >

                <intent-filter >
                    <action android:name="com.google.android.c2dm.intent.RECEIVE" >
                    </action>
                    <category android:name="Wordy.Game" />
                </intent-filter>
            </receiver>



      <activity android:name="Result" android:label="@string/app_name" android:screenOrientation="portrait" />
              <activity android:name="PlayField" android:label="@string/app_name" android:screenOrientation="portrait" />
              <activity android:name="Game" android:label="@string/app_name" android:screenOrientation="portrait" />
              <activity android:name="News" android:label="@string/app_name" android:screenOrientation="portrait" />
              <activity android:name="PlayOnline" android:label="@string/app_name" android:screenOrientation="portrait" />     
              <activity android:name="UsersOnline" android:label="@string/app_name" android:screenOrientation="portrait" />        
        </application>
    </manifest> 

2 个答案:

答案 0 :(得分:7)

我终于发现什么是错的,应用程序中的包名不允许以大写字母开头。

答案 1 :(得分:0)

尝试使用a为您的活动添加前缀。或完整的包名:

<activity android:name="com.gizm0.YourClass"></activvity>

  <activity android:name=".YourClass"></activvity>