我使用的是 Android Studio 2.1,没有 Blank Activity 选项。我见过有人问这个,一般的建议是“自己做一个”。问题是我对 Android 开发一无所知,所以我按照本教程 http://developer.android.com/training/basics/firstapp/creating-project.html 应该带我完成基本步骤(至少它似乎它会那样做)。所以我试图让事情与他们在那里所做的保持一致。那么我应该选择 Empty Activity 还是 Basic Activity?我对它们都进行了尝试,据我所知,它们之间几乎没有什么区别,但是 Empty Activity 听起来更像是一个干净的启动活动,而不是 Basic。我不知道。我应该怎么办?
原文由 icebp 发布,翻译遵循 CC BY-SA 4.0 许可协议
空活动与空白活动相同。 It will gives you
.xml
file that will be your layout where you put yourButtons
orEditTexts
and.java
file where you will code your活动。But Basic Activity will gives you two
.xml
files, themain_activity.xml
that containFloatingActionButton
and aToolBar
and it will include the second.xml
你将把你的Buttons
和一个.java
文件放在哪里。如果您是 android 开发的新手,请从 Empty Activity 开始,它更容易理解