Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Simple Android App (2014) Getting Started with Android Running the Fun Facts Project

Kelvin Lam
Kelvin Lam
1,285 Points

I got an error saying " pkg: /data/local/tmp/KelvinLam.funfacts Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]"

pkg: /data/local/tmp/KelvinLam.funfacts Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

I got this error when i try to run my app on the android emulator, the emulator loaded up but the app won't run,

Mazen Halawi
Mazen Halawi
7,806 Points

can you check your manifest file and see if its empty?

Kelvin Lam
Kelvin Lam
1,285 Points

this is my manifest file:

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

-<manifest android:versionName="1.0" android:versionCode="1" package="KelvinLam.funfacts" xmlns:android="http://schemas.android.com/apk/res/android">

<uses-sdk android:targetSdkVersion="19" android:minSdkVersion="14"/>

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

-<activity android:label="@string/app_name" android:name="KelvinLam.funfacts.FunFactsActivity">

-<intent-filter>

<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>

</intent-filter>

</activity>

</application>

</manifest>"

3 Answers

Mazen Halawi
Mazen Halawi
7,806 Points

is that all you have there? can you copy the whole content of your manifest

Kelvin Lam
Kelvin Lam
1,285 Points

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="KelvinLam.funfacts" android:versionCode="1" android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="19" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="KelvinLam.funfacts.FunFactsActivity"
        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>

Mazen Halawi
Mazen Halawi
7,806 Points

change your package name to small letters package="KelvinLam.funfacts" -> package="kelvinlam.funfacts"

Kelvin Lam
Kelvin Lam
1,285 Points

I did, and that dodged the problem. but I would like to know why it is the case since it seems in the video he used capital letters with no problem.

Is there a way to fix this issue from its root cause?

Mazen Halawi
Mazen Halawi
7,806 Points

package names are written in lower case to avoid conflict with the names of classes or interfaces. you can read more about it here

http://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html