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) Coding the Fun Facts Using Conditionals (if Statements)

Having trouble getting emulator to work on Android Studio

Every time I try view my project on the emulator on android studio I am getting a red message saying

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

This will not allow me to view anything. Does anyone have an idea of why this is happening?

Thanks for your help!

Cheers, Peter

2 Answers

Harry James
Harry James
14,780 Points

Hello, many users have had this issue as a result of having capital letters in the package name. If you change your package name from Astro.funfacts to astro.funfacts, it should fix the issue.

To do this, right-click on your package and press Refactor then Rename. Then, enter the new name. Make sure that you have all boxes on the dialog checked. Else, you may get errors in your xml files. Then, press Preview and then OK.

If you still have errors, go to Project and then Clean. Then, select Clean all projects (Or if you have a lot of projects, just choose the one you're working on). After that, press OK.

If you still have errors after that, open up your AndroidManifest.xml file in the XML View and look for any errors (Sometimes refactoring the package name doesn't quite work well for XML files). Usually, you'll understand what's gone wrong and will be able to manually correct it. If you still have errors, post the contents of your AndroidManifest.xml file here and I'll take a look :)

Thanks mate. sorry for the late reply, i have had a bit of a break from coding. solution worked great!

Harry James
Harry James
14,780 Points

No problem! Glad it fixed it for you! ;)