5

I've looked at other postings about the INSTALL_PARSE_FAILED_MANIFEST_MALFORMED but still can't figure out what's wrong with my particular manifest. Any suggestions?

<?xml version="1.0" encoding="utf-8"?>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="ThePackage.SnapVest.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="ThePackage.SnapVest.MyActiveOptions"
        android:label="@string/title_activity_my_active_options" >
    </activity>
    <activity
        android:name="ThePackage.SnapVest.MyTrades"
        android:label="@string/title_activity_my_trades" >
    </activity>
    <activity
        android:name="ThePackage.SnapVest.MyAccount"
        android:label="@string/title_activity_my_account" >
    </activity>
    <activity
        android:name="ThePackage.SnapVest.Leaderboard"
        android:label="@string/title_activity_leaderboard" >
    </activity>
</application>

So, where's my error?

Here's the actual sequence when I run it:

Waiting for device.
Target device: kyocera-event-1001c1c
Uploading file
    local path: C:\Users\Roger Garrett\AndroidStudioProjects\SnapVest\app\build\apk\app-debug-unaligned.apk
    remote path: /data/local/tmp/ThePackage.SnapVest
Installing ThePackage.SnapVest
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/ThePackage.SnapVest"
pkg: /data/local/tmp/ThePackage.SnapVest
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
Roger Garrett
  • 349
  • 1
  • 7
  • 13
  • try to remove the first line of your manifest file (the `comment`), make sure the first line is `` – Aprian Feb 12 '14 at 02:10
  • 1
    Okay, I think the problem is you use Capital for package name. You should use lower case for package name. – Aprian Feb 12 '14 at 02:54
  • Yikes. you're right. I changed ThePackage.SnapVest to thepackage.snapvest throughout the manfest and also had to rename the various related folders and then it runs without reporting that MANIFEST error. It still doesn't run,though, because now it can't find the main activity. But it's really weird that it ALLOWS you to use uppercase in places where it REQUIRES all lowercase. – Roger Garrett Feb 12 '14 at 03:54
  • I would suggest you to re-make a new project, and copy all the code back to the newly created project. – Aprian Feb 12 '14 at 04:04
  • For Android 12 users refer - https://stackoverflow.com/a/67916122/5996106 – karanatwal.github.io Jun 10 '21 at 07:48

3 Answers3

7

It's all because you added company domain (Android studio) in capital letters. Or the Package name. Change it to small letters and run the project. The problem will get resolved.

Robert
  • 5,278
  • 43
  • 65
  • 115
John Simon
  • 818
  • 11
  • 25
3

Change your

android:name="ThePackage.SnapVest.MainActivity"

TO

android:name=".MainActivity"

OR make all the characters in the package name lowercase except your class name

android:name="thepackage.snapvest.MainActivity"

Do change all the attributes named as android:name inside the activity tags as I suggested.

Community
  • 1
  • 1
Vishnuvathsan
  • 615
  • 1
  • 9
  • 11
1

In my case the package name had a capital letter. After changing to all small letters the app got installed successfully

Vinay
  • 1,284
  • 14
  • 24