简体   繁体   English

Android从Eclipse安装应用程序无法正常工作

[英]Android installing application from eclipse not working

Since now I have always used an emulator because I didn't have a test device. 从那时起,我一直使用模拟器,因为我没有测试设备。 But now I got a phone (htc wildfire s), I have enabled USB debugging and installed the google usb driver from the sdk manager. 但是现在我有了电话(htc wildfire s),已经启用USB调试并从sdk管理器安装了google usb驱动程序。 I have read that Eclipse should automatically install it on the phone if its connected to the usb when you run it as android application. 我已经读过,当您将Eclipse作为android应用程序运行时,如果它已连接到usb,则Eclipse应该自动将其安装在手机上。 When I ran it as android application it stills runs the emulator and nothing new is installed on the phone. 当我将其作为android应用程序运行时,它仍在运行模拟器,并且手机上未安装任何新东西。

Phone version is currently : 2.3.3 (API 10) 当前手机版本:2.3.3(API 10)

And application : 和应用:

android:minSdkVersion="8"
        android:targetSdkVersion="17" />

Here is how to fix this: 解决方法如下:

1- From the package explorer view right click on your project. 1-从程序包浏览器视图中,右键单击您的项目。

2- In the list there is an option debug as. 2-在列表中有一个选项debug as。

3- In debug as ... Debug Configurations. 3-在调试为...调试配置中。

4- Chose Android Application from the lift part of the window. 4-从窗口的升降部分选择Android应用程序。

5- In the right part there are multiple tabs, select target. 5-在右侧有多个选项卡,选择目标。

6- In Development Target Selection Mode .. select Always Prompt to pick device. 6-在开发目标选择模式下..选择始终提示以选择设备。

and then debug again 然后再次调试

I had faced a similar problem before. 我以前也遇到过类似的问题。 I was using a samsung phone instead. 我改用三星手机。 When i installed samsung Kies, the eclipse(or my PC for that matter) recognized the phone. 当我安装三星Kies时,日食(或我的PC)可以识别手机。

Try installing HTC Sync on your development machine. 尝试在开发计算机上安装HTC Sync。 http://www.htc.com/help/in/howto_iframe.aspx?id=109074&type=1&p_id=423 http://www.htc.com/help/in/howto_iframe.aspx?id=109074&type=1&p_id=423

This should solve your problem. 这应该可以解决您的问题。

In Eclipse, go into Window>Show View>More and select Devices. 在Eclipse中,进入“窗口”>“显示视图”>“更多”,然后选择“设备”。 If your device is not showing, and you have indeed enabled USB debugging on the device, then the driver is not installed. 如果未显示设备,并且确实在设备上启用了USB调试,则未安装驱动程序。 Check your phone model online and download the needed drivers. 在线检查您的手机型号并下载所需的驱动程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM