Content_main.xml丢失 [英] Content_main.xml missing
问题描述
我是Android Studio的新手.按照developer.android给出的教程,我创建了一个新项目.他们要求创建一个空白活动,并且由于没有这样的活动,因此我将空活动"用作模板.然后,该教程说在res/layout文件夹中将有一个content_main.xml,但是我没有找到.我建立了正确的应用程序吗?可能是什么错?预先感谢.
I am new to Android Studio. Following the tutorial given by developer.android I have created a new project. They asked to create a blank activity and as there is no one such, I have used Empty Activity as the template. Then the tutorial said that there will be a content_main.xml inside res/layout folder, but I didn't find one. Did I build the correct Application? What probably may be the wrong? Thanks in advance.
推荐答案
content_main.xml文件.默认情况下,此活动将在屏幕底部具有浮动按钮.
content_main.xml file will be generated when you choose "blank activity" . This activity will be having floating button by default at the bottom of the screen.
但是,当您选择空活动"时,不会生成content_main.xml,也不会具有浮动按钮,而只是简单的活动.
But when you choose "empty activty" then content_main.xml won't be generated and it won't be having floating button , but just simple activity.
因此,为您的教程选择空白活动",然后您的教程将运行正常
So for your tutorial choose "blank activity" and then your tutorial will run fine
这篇关于Content_main.xml丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!