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

Run error

Why does this error appear in them messages area: pkg: /data/local/tmp/Imagifun.funfacts Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

2 Answers

Did you do any changes in the manifest file? Can you show us the code of it if you did?

I did not make any change to the code, as I was not supposed to for this video

Can you open your AndroidManifest.xml and tell me what package name you have? You will see it written as... "package="Your Package Name""

here is the code you requested

<p>package="Imagifun.funfacts"</p>

change package="Imagifun.funfacts" to ... package="imagifun.funfacts" (making all the letters lowercase) and see if it works.

After changing the name, more errors occurred and it would not let me select a device. It went to a window titled "Edit configuration" with an error at the bottom of the window saying "Default Activity not found".

Did you do "refactor" -> "rename" or you just changed it hard-coded? The change should be refactored. Try undoing the change till you get back to your initial package name then select the name and do... right click, refactor -> rename and then change the name.

the following code was received from the messages tab after doing the following and running the application

Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Users\Mary\Downloads\android-studio-bundle-windows\android-studio\sdk\build-tools\android-4.4W\dx.bat --dex --num-threads=4 --output C:\Users\Mary\AndroidStudioProjects\FunFacts\app\build\intermediates\dex\debug C:\Users\Mary\AndroidStudioProjects\FunFacts\app\build\intermediates\classes\debug C:\Users\Mary\AndroidStudioProjects\FunFacts\app\build\intermediates\dependency-cache\debug Error Code: 1 Output: Exception in thread "pool-1-thread-3" Exception in thread "pool-1-thread-8" Exception in thread "pool-1-thread-6" Exception in thread "pool-1-thread-5" Exception in thread "pool-1-thread-7" Exception in thread "pool-1-thread-2" Exception in thread "pool-1-thread-1" Exception in thread "pool-1-thread-4" Exception in thread "pool-1-thread-10" Exception in thread "pool-1-thread-9" Exception in thread "pool-1-thread-12" no classfiles specified com.android.dx.cf.iface.ParseException: class name (imagifun/funfacts/FunFactsActivity) does not match path (Imagifun/funfacts/FunFactsActivity.class) at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:520) at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406) at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)

The problem is... " class name (imagifun/funfacts/FunFactsActivity) does not match path (Imagifun/funfacts/FunFactsActivity.class) ". If you change a variable without refactoring, it only changes in the file you are editing. If that variable is used in another class or another file, it does not change and you have to go change all those variables manually. By doing refactoring to a variable that is in many files, methods or classes, you automatically change them all as you edit the one you are refactoring. That is why I said undo...and refactor it. I am not sure if you still have android studio open to do that change... it won't change anything if you refactor the edited one. I suggest you make a new project with package name all in lowercase and see if it runs properly.