Androidstudio第一个程序hello world

Androidstudio第一个程序hello world

新建项目

file-new project
Androidstudio第一个程序hello world_第1张图片选择empty activity
Androidstudio第一个程序hello world_第2张图片设置名字,finish
Androidstudio第一个程序hello world_第3张图片创建之后打开AVD Manger,即Android虚拟设备管理
Androidstudio第一个程序hello world_第4张图片点击create virtual device
Androidstudio第一个程序hello world_第5张图片随便选个设备
Androidstudio第一个程序hello world_第6张图片下载一个Android版本,跟sdk匹配,笔者都是用最新的
Androidstudio第一个程序hello world_第7张图片

下载后就可以点击绿色三角run了,但会发现报错,提示修改BIOS一个选项。重启电脑,找到virtualdevice(差不多是这个),有可能在security下面,也可能在其他地方,仔细找一下,状态改为enabled,再打开就能真run了。但是速度很慢,需要耐心等待,下第三方模拟器会快点。

Androidstudio第一个程序hello world_第8张图片
找到activity_main.xml文件,修改text后的文字就能修改输出
Androidstudio第一个程序hello world_第9张图片

你可能感兴趣的:(Android)