搭建Android Studio2.1配HTC One M8做测试环境

Installing & configuring Android Studio


I followed this book's instructions to set up my AS environment.




For the rest, I took this video as a reference. It can give you a rough idea about how to get it to work. The setup details vary from brand to brand, but the overall procedure is pretty similar, I went through the steps, but my solution is slightly different coz the presenter used Samsung for his demonstration.




Configuring HTC One M8 Mobilephone


The steps to enable USB debugging on your Android device is almost the same for all brands, the only difference for me is that HTC One M8 doesn't support PTP USB connection mode, so I have to leave it as default, which is MTP. According to the video tutorial, it should work in PTP mode though.




Installing HTC USB Driver In Windows 7


I didn't follow the instructions from that video, coz it didn't work for me.

I found the USB drivers for M8 from this link, the HTC official site sucks. I downloaded both wares provided in the webpage, and installed them.


  1. HTC_Driver_4.10.0.001.exe
  2. HTC_BMP_USB_Driver_x64_1.0.5375.msi


After installation, I can see the mobile device in Device Manager panel:





Configuring Android Studio


Go to your Android SDK installation directory, run SDK Manager.exe, and you need to install Google USB Driver:




Now you can start your AS, open your project, go to Tools -> Android -> Check "Enable ADB Integration". However, I failed at this step, the action at background is actually start ADB server by running ADB command. So I just ran the command manually:




adb start-server

is the one did the job.


Now, click Run button to run the Android app, from the popped device monitor dialog, you should see the Android device, select it.

After building, and transferring the files to your device, you should see it running on it:






Ref:

http://stackoverflow.com/questions/26137634/ddms-adb-exe-start-server-failed-run-manually-if-necessary-android-studio

http://stackoverflow.com/questions/2306322/adb-wont-start

http://android.stackexchange.com/questions/100485/switching-htc-one-m8-into-ptp-mode

https://developer.android.com/studio/run/oem-usb.html

https://developer.android.com/studio/run/device.html














评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值