1

I realize this may come as a duplicate question, I have found multiple questions looking for the same error but am still unable to solve the issue.

I am working on an Android application and for now only have one activity (a login screen) and when I attempt to run the application an error message appears:

pkg: /data/local/tmp/MyName.myapp
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

As I said, I am dumbfounded. Has anyone experienced this, or notice something out of the ordinary in my manifest file?

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

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity
            android:name=".LoginActivity"
            android:label="@string/app_name" >

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

        </activity>
    </application>
</manifest>
AdamMc331
  • 16,492
  • 10
  • 71
  • 133
  • 1
    Possible duplicate of [INSTALL\_PARSE\_FAILED\_MANIFEST\_MALFORMED](http://stackoverflow.com/questions/26721951/install-parse-failed-manifest-malformed) – Peter Warrington May 18 '17 at 16:58

2 Answers2

6

Aha, I continued to dig and dig and finally found it.

Thanks to this question here I realized it is because the package name cannot have capital letters. I changed my package name to simply 'myappname' instead of 'MyName.myappname' that android studio set it automatically, and was able to build and run.

Thank you to anyone who took the time to look into this.

Community
  • 1
  • 1
AdamMc331
  • 16,492
  • 10
  • 71
  • 133
1
notice something out of the ordinary in my manifest file?

Yes you dont have a target API tag in your manifest, which is needed to check for target device of your choice.

sample:

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="18" />
Rod_Algonquin
  • 26,074
  • 6
  • 52
  • 63
  • Thanks, but I don't think that's required? You can build and run an app without it. I answered my own question because I finally found the answer. – AdamMc331 Aug 03 '14 at 02:34
  • 1
    @McAdam331 "but I don't think that's required?", very wrong what if I run that app with api 10 but some of your code are made on api 11, what do you think will happen.. guess what it will crash. – Rod_Algonquin Aug 03 '14 at 02:36
  • Good to know. Perhaps I've just been lucky and always tested using the API I know I need. I'll definitely go add that to my code, but it will still build without that. – AdamMc331 Aug 03 '14 at 02:39
  • 1
    @McAdam331 yes it will build, but you really need to add a target device for your app. The higher the target the modern the device you are targeting – Rod_Algonquin Aug 03 '14 at 02:42
  • 1
    And here's an interesting [question](http://stackoverflow.com/questions/19997509/android-studio-why-are-minsdkversion-and-targetsdkversion-specified-both-in-and) about it. – AdamMc331 Aug 03 '14 at 02:42