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 (retired 2014) Getting Started with Android Android Setup and the Crystal Ball Project

fragment_main

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.