Failure INSTALL PARSE FAILED MANIFEST MALFORMED

I am getting a strange issue while installing application.

When I compiling my project there is no error but when I trying to launch its shows me,

Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED Error.

I have tried so many thing related Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED error and also follow that rule but something goes wrong.

<manifest
android:hardwareAccelerated="true"
android:versionCode="1"
android:versionName="0.0.1"
package="Work.Work"
xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:resizeable="true"
    android:smallScreens="true"
    android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application
    android:hardwareAccelerated="true"
    android:icon="@drawable/icon"
    android:label="@string/app_name"
    android:supportsRtl="true">
    <activity
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
        android:label="@string/activity_name"
        android:launchMode="singleTop"
        android:name="MainActivity"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
        android:windowSoftInputMode="adjustResize">
        <intent-filter android:label="@string/launcher_name">
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:exported="true"
        android:name="com.plugin.gcm.PushHandlerActivity" />

    <receiver
        android:name="com.plugin.gcm.CordovaGCMBroadcastReceiver"
        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="Work.Work" />
        </intent-filter>
    </receiver>
    <service android:name="com.plugin.gcm.GCMIntentService" />
    <activity
        android:exported="true"
        android:name="com.adobe.phonegap.push.PushHandlerActivity" />

    <receiver android:name="com.adobe.phonegap.push.BackgroundActionButtonHandler" />
    <receiver
        android:exported="true"
        android:name="com.google.android.gms.gcm.GcmReceiver"
        android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <category android:name="${applicationId}" />
        </intent-filter>
    </receiver>

    <service
        android:exported="false"
        android:name="com.adobe.phonegap.push.GCMIntentService">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
        </intent-filter>
    </service>
    <service
        android:exported="false"
        android:name="com.adobe.phonegap.push.PushInstanceIDListenerService">
        <intent-filter>
            <action android:name="com.google.android.gms.iid.InstanceID" />
        </intent-filter>
    </service>
    <service
        android:exported="false"
        android:name="com.adobe.phonegap.push.RegistrationIntentService" />
</application>
<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="23" />

<uses-permission android:name="android.permission.ACCESS_NETWORK_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="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission
    android:name="Work.Work.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />
<!--<uses-permission android:name="Work.Work.permission.C2D_MESSAGE" />-->
<!--<uses-permission android:maxSdkVersion="18" android:name="android.permission.WRITE_EXTERNAL_STORAGE" />-->
<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" />
<uses-permission
    android:name="${applicationId}.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />
<!--<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />-->

Answers


I was having this error because i had capital letters in my package name like this.

Com.Droider.packagename;

After i had changed it to something like:

com.droider.packagename;

In your case try to change it to:

work.work;

EDIT 1 :

May be this causes also.

android:name="MainActivity"

Change this to.

android:name=".MainActivity"

Just check all the

 android:name="..."

in your manifest and see if the you forgot to put a dot in the beginning of a name that should have it, mostly names of your classes.


package="Work"

APK manifest package names must contain at least one . separator in them. For example:

package="work.work"

You can read the PackageParser source to learn about various ways installation can fail with INSTALL_PARSE_FAILED_MANIFEST_MALFORMED.


In my case, i put ':' on value of android:process

<service
        android:name=".Views.Views.services.MyService"
        android:process=":remote" />

It works for me


Your package name has a capital letter in it. Try refactoring your package so that all the letters are lowercase. To do this, in the panel for your project, make sure you're in Android view mode, then click the gear that is a little to the right of the view indicator, then make sure compact empty middle packages is unchecked. Next, right click on your package with a capital letter in it and select refactor -> rename. Change it to have a lower case, double check your AndroidManifest.xml is now a lower case, if not, manually edit it.


I had the same problem. I had create a new package Start with capital letter. Its leads to this same problem . Check your all package folder names and be sure all in small letters.

Happy coding


in my case place i placed Application class outside side main package folder.

just move Application class to root activities folder.


in my case if you have changed your activity to fragment then remove that activity name from your androidmanifest.xml file

<activity
        android:name=".fragment_change_password"
        android:screenOrientation="portrait" />

remove this type of lines from manifest file


In manifest file meta data tag will be available for each xml resource file . If that meta data doesn't have android:resource location , this issue will arise .

Example :

   <meta-data android:name="com.google.android.actions"
   android:resource="@drawable/cellphone"/>

Need Your Help

Delegating constructor gives segmentation fault when using class field for argument

c++ native raspberry-pi3 delegating-constructor

Actually the segmentation fault happens in another program I tried to compile which happens because of this behaviour.