Android应用程序在手机上运行的步骤

仅用于计算机是Windows操作

1.In Eclipse, you can do this from the Application tab when viewing the Manifest (on the right side, set Debuggable to true). Otherwise, in the AndroidManifest.xmlfile, add android:debuggable="true" to the <application> element.

我们就直接了当的在Eclipse里,在AndroidManifest.xml中<application>里加上android:debuggable="true"

 

2.Turn on "USB Debugging" on your device.

On the device, go to the home screen, press MENU, select Applications > Development, then enable USB debugging.

就是把手机的USB调试模式打开,方法是(我以HTC Desire HD为例):Menu>设置>应用程序>开发>勾选”USB调试“

 

3.If you're developing on Windows, you need to install a USB driver for adb. If you're using an Android Developer Phone (ADP), Nexus One, or Nexus S, see theGoogle Windows USB Driver. Otherwise, you can find a link to the appropriate OEM driver in the OEM USB Drivers document.

就是把手机用USB线连到电脑上,安装驱动程序,Win7会自动安装,如若没有自动安装,在各手机网站的技术支持里找到驱动并下载。

 

4.在Eclipse里点Run>Run(或Debug),这时会弹出一个窗口,让你选择用模拟器还是手机来显示,选择手机,再看看手机上是不是出现了运行结果呢?呵呵。

图中第一个是模拟器,第二个就是我的手机,呵呵。

 

以下是在模拟器上运行的效果:

 

 

再来一张手机上的效果展示:

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值