·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> app软件开发 >> Android开发 >> Android学习笔记(一)环境安装及第一个hello world

Android学习笔记(一)环境安装及第一个hello world

作者:佚名      Android开发编辑:admin      更新时间:2022-07-23

开发环境

安装JDK和JRE

下载安装文件并安装:

jdk-8u11-windows-i586.exe
jre-8u11-windows-i586.exe
使用google提供的adt-bundle,直接解压到本地即可使用,使用版本如下:

adt-bundle-windows-x86-20131030.zip
第一个android工程

打开eclipse如下图所示:

enter image description here

新建工程

新建一个工程,取名为FirstApp,使用默认设置 。

 File->New->Android Application Project

 enter image description here

一路 next 直到 finish 。

Build Project

Project->Build Project

调试

调试使用的手机型号:MI 3W   
按如下方式打开usb调试选项:

 1. 进入【设置】->【关于手机】连续点击【Android 版本】5次 
 2. 后退至【设置】可看到【开发者选项】 
 3. 进入【开发者选项】
 4. 打开【USB 调试】 
首次连接手机会安装驱动,等待驱动安装成功。

进入adt-buldle安装目录下的sdk\platform-tools目录如下输入如下指令:

 enter image description here

看到device字样说明设备成功识别了。

运行程序

【Run】->【Run As】->【1 Android Application】

点击后可在Console窗口中看到:

 enter image description here

在手机中同意安装应用,安装完成后自动运行如下图:

 enter image description here

第一个App成功运行。