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 trialKelvin Lam
1,285 PointsI 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,
Kelvin Lam
1,285 Pointsthis 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
7,806 Pointsis that all you have there? can you copy the whole content of your manifest
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
7,806 Pointschange your package name to small letters package="KelvinLam.funfacts" -> package="kelvinlam.funfacts"
Kelvin Lam
1,285 PointsI 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
7,806 Pointspackage 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
Mazen Halawi
7,806 PointsMazen Halawi
7,806 Pointscan you check your manifest file and see if its empty?