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 trialHendy Budhigraha
17,328 PointsMy app crashes after I moved MainActivity class to ui package. anyone can help?
Using the default settings in the app configuration, it says "Default Activity not found"
After choosing 'Launch' and directing it to MainActivity, it says "the activity 'MainActivity' is not declared in AndroidManifest.xml"
2 Answers
Ozhan Saat
Courses Plus Student 4,002 PointsTry something like com.example.hendy.stormy.MainActivity. The first bit should be whatever your main package is named.
Hendy Budhigraha
17,328 PointsHi, thank you for your response.
I tried the code, but it is not working as well. Is the version of android studio affecting this error? because I am using the old version that Ben provided in his first video
Philip G
14,600 PointsHi Mandy,
The code works fine for me. Check the name of your MainActivity and your package name, and if you named your ui package lower or upper case. If it's not working, please provide us with a screenshot of your file structure.
Best Regards, Philip
Hendy Budhigraha
17,328 PointsHendy Budhigraha
17,328 PointsThe following is the AndroidManifest.xml file