最近一直忙着考试的事情,然后找工作,找实习,找钱啊。对于Android我抱有很大的梦想,现实是残酷的。
OK,上面纯粹扯蛋了。今天手机连接电脑,打开USB调试,理论上就应该连接eclipse成功,可以在手机上直接测试开发中的项目。但是问题来了,怎么弄都没有反应。
什么叫怎么弄都没反应,我尝试了百度中的所有方法:
OK,实在不能忍了,我就去了stackoverflow,已search发现有人的情况和我是一样的。引用一下原文,我才发现自己并没有深入的去理解自己的问题所在:
I don't want to debug my Android apps on emulator (Android Virtual Device) anymore. Instead, I want to debug it on my phone. My phone is LG Optimus L7 P700.
I already have downloaded USB Driver for my phone from official LG support web site. On my AVD Manager: Google USB Driver is also installed. Also, I ticked my Settings > Developer options-> USB debugging on my phone to be enabled. I connected my phone via USB cable, but I have problem now. When I run adb devices
command on my command prompt as mentioned on tutorials I found on Google, my list of attached devices is empty, as u can see below in screenshoot. Here is screenshoot of my command prompt: /Upload/Images/2013110203/4B1F5D94806AF710.jpg
Also when I go to My Computer->Manage, my phone have yellow exclamation point, I dont know why ? Here is screenshoot: /Upload/Images/2013110203/4571279266A1997D.jpg
最终我发现,原来是我的Nexus 4驱动未装好,这里我就要纳闷了,我驱动没有装好,我也可以传各种文件么。。。额,求科普。而且我的驱动无法自动搜索,迫使我从网上下载安装,然后终于在Eclipse中看到了我的手机。OH MY GOD. HOLLY SHIT!
另外这里还有一个解决办法,放在这里,算是大杀器吧,理论上可以通杀非1,2方法的问题。
这里也是引用的别人的话,凑活看吧,比较好理解,就是删了重装。
this is tricky sometimes. uninstall adb drivers through device manager and re-install them. uninstall all other adb drivers probably installed on your machine first before re-install. after installation connect your phone and choose driver-path manually. this is always the biggest pain for me with android development, I wasn`t able to connect one of my devices at all.
原因找到了,觉得自己很2.唉,有木有,专业开发20年,也会犯这种错误么。。。