Failure INSTALL PARSE FAILED MANIFEST MALFORMED
Asked Answered
H

12

12

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" />-->
Herdic answered 6/5, 2016 at 7:23 Comment(4)
What is your Package Name ? is it contains only package="Work" this ?Joleenjolene
no,i will change package name.@jaydroiderHerdic
Check my answer below.Joleenjolene
i will check but this line have error <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>Herdic
J
26

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"
Joleenjolene answered 6/5, 2016 at 8:27 Comment(6)
i check all small latter like that com.droider.packagename;Herdic
Try your luck bhai. i don;'t be able to assume now. it's all the major issues this error have which i suggested. mostly it solve this.Joleenjolene
Tell me 1 thing the package name in small letters replaced at all the places used in manifest. bcz i have noticed you have used it more than twice. so check that once bhai.Joleenjolene
Changes at all the required place and checked right ? for small letters.Joleenjolene
ok last but not list try with removing support screens part from manifest.Joleenjolene
Let us continue this discussion in chat.Herdic
C
11

It May cause for Android 12 . For this

Add exported = true in your Activity Example :

 <activity
            android:exported="true"   />
Chloramphenicol answered 22/3, 2022 at 11:48 Comment(1)
I had worked with another project with a more recent android studio (Electric Eel?), which gave proper errors for lack of android:exported, but then back to older Android Studio 4.1.3 for another older project updating to API level 33, it just fell to the generic manifest malformed message. Thanks for pointing this out.Calash
R
3

Just check all the

 android:name="..."

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

Rahman answered 22/11, 2016 at 16:57 Comment(0)
P
2
<activity
        android:exported="true"   />
Pearlene answered 3/10, 2022 at 14:57 Comment(0)
D
1
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.

Doody answered 6/5, 2016 at 7:40 Comment(2)
it's not a solution ,i change package name.Herdic
It's one problem you have. There may be others.Doody
R
1

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

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

It works for me

Racketeer answered 20/3, 2018 at 21:40 Comment(0)
M
1

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.

it was my problem

Happy coding

Mooncalf answered 18/9, 2018 at 6:23 Comment(0)
D
0

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

Dealfish answered 3/8, 2017 at 4:22 Comment(0)
V
0

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.

Valdemar answered 22/9, 2017 at 18:16 Comment(0)
S
0

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"/>
Shanty answered 10/12, 2018 at 11:39 Comment(1)
Please complete your answer as this seems to be missing some part.Godhead
D
0

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

just move Application class to root activities folder.

Dealfish answered 14/6, 2019 at 11:20 Comment(0)
S
0

the exported flag should be present to activities which has intent filter, receivers, services, providers...

in my case i missed receiver and provider

    <provider
        android:name="androidx.core.content.FileProvider"
        android:authorities="${applicationId}.provider"
        android:exported="false"
        android:enabled="true"
        android:grantUriPermissions="true">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/provider_paths" />
    </provider>
Shirline answered 11/10, 2023 at 9:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.