安装失败,消息为INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

时间:2016-07-27 08:14:49

标签: java android

我在安装应用程序时遇到了奇怪的问题。如果我在Android 5.0及更高版本上安装应用程序,那么应用程序正在安装并正常运行。但是,如果我在4.4或4.2等较低版本上安装应用程序,那么在安装时它会给我这个错误。 Getting error while installing app

经过大量的RND后,如果您的包名包含大写字母,那么您会收到此类错误,但在我的包名中没有上限字母。下面是我的清单文件代码:-`     包= “com.aznimo” >

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
////////////////
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

<permission
    android:name="com.example.gcm.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />

<uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" />

<application
    android:name="Comman.MyApplication"
    android:allowBackup="true"
    android:hardwareAccelerated="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/app_id" />

    <activity
        android:name=".Splash_Screen"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".Login_Screen"
        android:label="@string/title_activity_login__screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden|adjustResize" />
    <activity
        android:name=".Signup_Screen"
        android:label="@string/title_activity_signup__screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden|adjustResize" />
    <activity
        android:name=".Forgot_Password"
        android:label="@string/title_activity_forgot__password"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden|adjustResize" />
    <activity
        android:name="com.facebook.FacebookActivity"
        android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" />

    <provider
        android:name="com.facebook.FacebookContentProvider"
        android:authorities="com.facebook.app.FacebookContentProvider922739857843448"
        android:exported="true" />

    <activity
        android:name=".Privacy_Policy_Screen"
        android:label="@string/title_activity_privacy__policy__screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Home_Screen"
        android:label="@string/title_activity_home__screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Product_View_All"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Category_List_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Product_detail"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".GalleryActivity"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".You_Tube_Screen"
        android:screenOrientation="landscape"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Profile_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Edit_Profile_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden|adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data
                android:host="t4jsample"
                android:scheme="oauth" />
        </intent-filter>
    </activity>
    <activity
        android:name=".New_Address_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden|adjustResize" />
    <activity
        android:name=".Twitter_Webview_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Address_List_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Order_List_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Order_Detail_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Search_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateAlwaysVisible" />
    <activity
        android:name=".Cart_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Delivery_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Payment_Confirmation_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".Payment_Method_Screen"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    <activity
        android:name=".New_Address_Screen_Map"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateHidden" />
    /////////////
    <receiver
        android:name="com.google.android.gms.gcm.GcmReceiver"
        android:exported="true"
        android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />

            <category android:name="com.aznimo" />
        </intent-filter>
    </receiver>

    <service
        android:name=".PushNotificationService"
        android:exported="false">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
        </intent-filter>
    </service>
    <!--
      Optionally, register AnalyticsReceiver and AnalyticsService to support background
      dispatching on non-Google Play devices
    -->
    <receiver
        android:name="com.google.android.gms.analytics.AnalyticsReceiver"
        android:enabled="true">
        <intent-filter>
            <action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
        </intent-filter>
    </receiver>

    <service
        android:name="com.google.android.gms.analytics.AnalyticsService"
        android:enabled="true"
        android:exported="false" />

    <!--
         Optionally, register CampaignTrackingReceiver and CampaignTrackingService to enable
         installation campaign reporting
    -->
    <receiver
        android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
        android:exported="true">
        <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER" />
        </intent-filter>
    </receiver>

    <service android:name="com.google.android.gms.analytics.CampaignTrackingService" />

    <!--
         The API key for Google Maps-based APIs is defined as a string resource.
         (See the file "res/values/google_maps_api.xml").
         Note that the API key is linked to the encryption key used to sign the APK.
         You need a different API key for each encryption key, including the release key that is used to
         sign the APK for publishing.
         You can define the keys for the debug and release targets in src/debug/ and src/release/.
    -->
    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="@string/google_maps_key" />


</application>

`

我甚至没有在logcat部分中收到任何错误。任何人都能告诉我这个问题或我做错了什么。提前谢谢。

1 个答案:

答案 0 :(得分:1)

至少这会导致一个&#34;显示格式错误&#34;错误:

<application
    android:name="Comman.MyApplication"

如果应用程序类名称包含.,则将其视为完全限定的包名称。包裹部分必须以az之间的小写字母开头,您的首字母为C

请参阅PackageParser source了解安装失败的各种方法&#34;显示格式错误&#34;。在这种情况下,null在解析application元素时会从buildClassName()返回。