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 Lists and Adapters (2015) Lists with RecyclerViews Introducing RecyclerView

Problem on adding a new activity

Whenever I add a new activity (blank or other) in my layout two xml files are generated. One is actvity_<name_of_Activity_>.xml and other is content_<name_of_Activity>.xml. How do I resolve this problem?

1 Answer

Niyamat Almass
Niyamat Almass
8,176 Points

Solutions

  • When you create a project for the first time you have to choose empty activity instead of blank activity. Empty activity doesn't create content_main res file.

Hope this helps!

Thanks Niyamat Almass . It worked. Though, can you tell me why two xml files are generated when we choose the Blank Activity.