XML : Android Studio, creating any new activity now defaults to nothing and does not create a content.xml

I am a noob to Android Studio, I started a project and everything was going fine. Any time I created a new activity I would have a default screen with a toolbar at the top and an email icon.

Later, and I have no idea what caused this change, any time I created a new activity everything would be completely empty (see image below) with any type of new screen that I would create. Not only that, but Android Studio no longer would create the default content.xml, but only the activity.xml which everything would be edited in.

This would not be a problem normally, I just edited everything in the activity.xml for any new screen that I would make. This works fine for any test phone (avd). However, when I try it on a real phone none of the new screens work and causes the app to crash. I fear this may be because it doesn't follow the earlier default layout of having both content.xml and activity.xml. I tried to create the content.xml for any of the new screens, but I got a rendering error.

My question basically asks is there anything I can do apart from starting over?

How do I change back to the default for creating new activities?

Is there an easy way to copy code in case I need to start over?

(I'VE TRIED BOTH NEW BLANK AND NEW EMPTY, BOTH DON'T WORK YET WORKED EARLIER)

Image

No comments:

Post a Comment