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

Android Studio Error - Build a Weather App

I am currently on the Android track and working on the Stormy Weather App. Everything was going along fine until this error popped up:

$ adb push /Users/micahhoward/Stormy/app/build/outputs/apk/debug/app-debug.apk /data/local/tmp/com.micahbhoward.stormy $ adb shell pm install -t -r "/data/local/tmp/com.micahbhoward.stormy" Success APK installed in 1 s 168 ms $ adb shell am start -n "com.micahbhoward.stormy/com.micahbhoward.stormy.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Error while executing: am start -n "com.micahbhoward.stormy/com.micahbhoward.stormy.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.micahbhoward.stormy/.MainActivity } Error type 3 Error: Activity class {com.micahbhoward.stormy/com.micahbhoward.stormy.MainActivity} does not exist.

Error while Launching activity

I have spent many hours trying to find a solution to this problem to no avail.

Thank you in advance for your help!

1 Answer

Hi Micah. Have you tried File > Invalidate Caches / Restart ?

Also, sometimes uninstalling/reinstalling the app on your phone or emulator can help.

Hi Lauren,

I tried your first suggestion. Unfortunately, that did not work.

Stormy is not listed under Installed apps on the emulator. I looked for that before. I am an iOS user. This is my first experince with anything Android. Should I be looking for the app somewhere else on the emulator?

I have also tried nearly everything on this page: https://stackoverflow.com/questions/20915266/error-type-3-error-activity-class-does-not-exist

This is very frustrating. Any other suggestions?

Thank you for your help!

Hi Lauren,

I finally got this working! I wiped the data on the emulator. That did the trick.

Thank you again for your help!

Hi Micah. Awesome! Yes, clearing the cached data is another option. Glad to hear you fixed it. Good luck with the course!