Kalianey
Kalianey

Reputation: 2798

Android - Installation failed with message: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

I cannot run my app anymore, I have the error:

Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

I read many other questions about it here but I didn't find a solution so far, could anyone have a look at my manifest and tell me what I did wrong?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kalianey.com.bonnieandclit" >

<application
    android:name="Utils.KYController"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".Register"
        android:label="@string/title_activity_register" >
    </activity>
    <activity
        android:name=".People"
        android:label="@string/title_activity_people" >
    </activity>
</application>
</manifest>

EDIT: error log

Installing kalianey.com.bonnieandclit
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/kalianey.com.bonnieandclit"
pkg: /data/local/tmp/kalianey.com.bonnieandclit
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

EDIT 2: screenshot of the file structure

file structure

Upvotes: 3

Views: 7984

Answers (2)

Andy
Andy

Reputation: 3

In my project,I have two package and I change my "android.intent.action.MAIN" to a new package,that i found this problem.Then i copy into my old package,and it gone. myabe it can help you.

Upvotes: 0

nbroeking
nbroeking

Reputation: 8928

The error message is non intuitive at all. You have a package that has a capital letter. Utils should be changed to util. Once the package name is changed switch it in your manifest to be:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kalianey.com.bonnieandclit" >

<application
    android:name="utils.KYController"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>
    <activity
        android:name=".Register"
        android:label="@string/title_activity_register" >
    </activity>
    <activity
        android:name=".People"
        android:label="@string/title_activity_people" >
    </activity>
</application>
</manifest>

Notice Utils.KYController was changed to utils.KYController

Once you make that package name change the problem will be fixed.

Upvotes: 13

Related Questions