2012-07-04 231 views
0

我試圖在我的android應用程序中使用C2DM,但添加後我無法安裝應用程序。我收到此錯誤「安裝錯誤:INSTALL_PARSE_FAILED_MANIFEST_MALFORMED」。但我看不出什麼是錯的。安裝android應用程序時出錯

任何知道我做錯了的人?

<?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> 

回答

5

我終於找到了什麼錯,在應用程序包的名稱是不允許開始大寫字母。

0

嘗試用a作爲前綴。或完整的包名稱:

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

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

我會嘗試,但它已經工作,然後我添加C2DM的東西。 – Daniel

+0

好吧,我明白了。它一直工作,直到你安裝了C2DM。已經看過:http://stackoverflow.com/questions/6198097/c2dm-permission-c2d-message-gives-installation-error他似乎也有同樣的問題 – giZm0

+0

我看了它,然後我發佈我的問題,但我沒有找到任何幫助我的東西。我已經使用這個教程http://www.vogella.com/articles/AndroidCloudToDeviceMessaging/article.html – Daniel

相關問題