Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build a Simple Android App (retired 2014) Getting Started with Android Android Setup and the Crystal Ball Project


My Eclipse environment doesn't have a fragment_main layout option. I only have activity_main. Does anyone know why this is or how to fix it?

1 Answer

This is usually because of the options that you are choosing in the new project wizard. If you are running ADT version 22.x or higher you will have the option to create a fragment based on the Activity Type. Blank activity and Master/Detail Flow Activity will allow for the option to create a fragment_main layout option. But Empty and Fullscreen Activities do not give you that option in the wizard.