Eclipse 找不到我的 HTC Sensation

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10247530/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 18:04:11  来源:igfitidea点击:

Eclipse doesn't find my HTC Sensation

androideclipsehtc-android

提问by Punchlinern

I don't have my Sensation any more, so obviously this no longer is a problem for me. I've decided not to delete the question since it might help others with the same problem.

我不再有我的感觉,所以显然这对我来说不再是问题。我决定不删除这个问题,因为它可能会帮助其他有同样问题的人。

Thanks for all your attempts to help!

感谢您提供帮助的所有尝试!



I'm trying to program apps for my HTC Sensation (ICS, 4.0.3), but I Eclipse doesn't find it. When I press the Run "[Application Name]"-button I just get the message "No compatible targets were found. Do you wish to a add new android virtual device?", and no devices is shown in the "Android Device Chooser" that is shown.
I tried with my friends Sony Ericsson XPERIA X10 Mini Pro (2.1-update1), and that worked.
I tried with both version 2.1, 2.3.3 and 4.0.3 of the application, but none worked on my Sensation.
I have USB-debugging, Stay Awake, and Allow mock locations activated.
I've been Googleing around for days, but I haven't found a solution. I've tried the following for example (found it here):

我正在尝试为我的 HTC Sensation(ICS,4.0.3)编写应用程序,但我的 Eclipse 没有找到它。当我按下运行“[应用程序名称]”按钮时,我只收到消息“找不到兼容的目标。您希望添加新的 android 虚拟设备吗?”,并且“Android 设备选择器”中未显示任何设备这显示。
我和我的朋友 Sony Ericsson XPERIA X10 Mini Pro (2.1-update1) 一起尝试过,并且奏效了。
我尝试了应用程序的 2.1、2.3.3 和 4.0.3 版本,但没有一个适用于我的 Sensation。
我已激活 USB 调试、保持唤醒和允许模拟位置。
我已经在谷歌上搜索了几天,但我还没有找到解决方案。例如,我尝试了以下操作(在此处找到):

  1. Make sure that your project is set to debuggable in the manifest android:debuggable="true"
  2. On the Hero make sure that it is set for remote debugging
    Menu > Settings > Applications > Development > USB Debugging (next three steps I got from http://developer.android.com/sdk/win-usb.html)
  3. Install HTC Sync (3.0)
  4. Use USBDeview to remove device
  5. Plug in device
  6. Check device is added by running "C:\Program Files\android-sdk-windows\platform-tools\adb.exe devices" which said the server was out of date and automatically killed and restarted it and showed my device as connected.
  7. Also ran this to be safe "C:\Program Files\HTC\HTC Sync 3.0\adb.exe devices"
  8. Then in eclipse click the drop down menu on the debug tool bar item > Debug Configurations... delete all the existing configurations and close
  9. The next time you debug it finds the HTC Hero and runs debug on it
  1. 确保您的项目在清单 android:debuggable="true" 中设置为可调试
  2. 在 Hero 上确保它设置为远程调试
    菜单 > 设置 > 应用程序 > 开发 > USB 调试(接下来的三个步骤我从http://developer.android.com/sdk/win-usb.html得到)
  3. 安装 HTC 同步 (3.0)
  4. 使用 USBDeview 删除设备
  5. 插入设备
  6. 通过运行“C:\Program Files\android-sdk-windows\platform-tools\adb.exe devices”来添加检查设备,该设备表示服务器已过期并自动终止并重新启动它并显示我的设备已连接。
  7. 还运行这个以确保安全“C:\Program Files\HTC\HTC Sync 3.0\adb.exe devices”
  8. 然后在 eclipse 中点击调试工具栏项上的下拉菜单 > Debug Configurations... 删除所有现有配置并关闭
  9. 下次调试时,它会找到 HTC Hero 并在其上运行调试

I've tried to "Run Configurations -> Target -> Select 'Manual' instead of 'Automatic'"

我试过“运行配置 -> 目标 -> 选择‘手动’而不是‘自动’”

I've installed the Google USB Drivers, and my phones drivers via HTC Sync from HTC.com

我已经通过HTC.com 的HTC Sync 安装了 Google USB 驱动程序和我的手机驱动程序

Edit:
I've got some more questions:

编辑:
我还有一些问题:

  • What version of Eclipse am I supposed to use? I started with Classic, but a friend of mine suggested me to use the Eclipse IDE for Java EE Developers-version instead.
  • What connection type, on my phone, am i supposed to use? Charge only? HTC Sync? I assume it's not Disk drive?
  • When I try to run a project for the first time after I start the Eclipse it tells me to ensure that adb is correctly located at 'D:\Documents\Eclipse\android-sdks\platform-tools\adb.exe' and can be executed, that is the directory of the file, and if I go there and run it manually it works, or at least I get past that error (and that's when it tells me I have no device connected).
  • 我应该使用哪个版本的 Eclipse?我从 Classic 开始,但我的一个朋友建议我改用Eclipse IDE for Java EE Developers-version。
  • 我应该在手机上使用哪种连接类型?仅限充电?HTC 同步?我假设它不是磁盘驱动器?
  • 当我在启动 Eclipse 后第一次尝试运行一个项目时,它告诉我 ensure that adb is correctly located at 'D:\Documents\Eclipse\android-sdks\platform-tools\adb.exe' and can be executed,这是文件的目录,如果我去那里手动运行它,它可以工作,或者至少我克服了那个错误(然后它告诉我我没有连接设备)。

Some quick info:

一些快速信息:

  • I'm running Windows 8 (64-bit) Consumer Preview in Boot Camp on my MacBook Pro
  • My phone is a HTC Sensation, Android 4.0.3, HTC Sense 3.6
  • Eclipse Java EE IDE for Web Developers, version: Indigo Service Release 2, Build id: 20120216-1857
  • adb version: 1.0.29
  • 我在 MacBook Pro 的 Boot Camp 中运行 Windows 8(64 位)Consumer Preview
  • 我的手机是HTC Sensation,Android 4.0.3,HTC Sense 3.6
  • 面向 Web 开发人员的 Eclipse Java EE IDE,版本:Indigo Service Release 2,构建 ID:20120216-1857
  • 亚行版本:1.0.29

回答by Nilesh

I have written an answer here : HTC Sensation XE - debug in eclipse very poor performance

我在这里写了一个答案:HTC Sensation XE - debug in eclipse 性能很差

Please check if it works for you!!

请检查它是否适合您!!

回答by Trooper

I had the same problem. I installed the USB tethering driverand the problem was solved.

我有同样的问题。我安装了USB 网络共享驱动程序,问题解决了。

回答by jdbertron

I had the same issue with the Inspire. Install HTC Sync for the USB driver that comes with it, then uninstall it because it will launch when you connect your phone and because it launches its own adb, you'll end up fighting it. On the phone, enable USB debugging and set the USB connection to Drive. Charge will work too, but Drive is better because the Eclipse Android Devices view will see all the installed software. Once that's set up, you should be able to issue 'adb devices' from a command line and see your phone as 'online' It will also compete a little with the eclipse invocations of the client, but that's fine.

我对 Inspire 也有同样的问题。为随附的 USB 驱动程序安装 HTC Sync,然后卸载它,因为它会在您连接手机时启动,并且因为它会启动自己的 adb,您最终会与它作斗争。在手机上,打开USB调试并将USB连接设置为Drive。Charge 也可以使用,但 Drive 更好,因为 Eclipse Android Devices 视图将看到所有已安装的软件。设置完成后,您应该能够从命令行发出“adb devices”并将您的手机视为“online”。它还会与客户端的 eclipse 调用竞争,但这很好。

回答by Ryan

I don't know did you find solution or not. I got the same problem as you mentioned exactly. I tried all the solutions from google searching, but nothing works...

不知道你有没有找到解决办法。我遇到了与您提到的完全相同的问题。我尝试了谷歌搜索的所有解决方案,但没有任何效果......

Then I just put the button "Factory data reset" (Setting/Storage), and it works!

然后我只要把按钮“恢复出厂设置”(设置/存储),它就可以工作了!

So if you still got this problem, maybe you could try this.

所以如果你仍然遇到这个问题,也许你可以试试这个。

回答by Javi

I have Windows 8 and an HTC sensation, after many attemps and a lot of research what worked for me was to Install HTC Sync under compatibility mode and Install the Windows 7 version, after doing this my Eclipse detected the device.

我有 Windows 8 和 HTC 感觉,经过多次尝试和大量研究,对我有用的是在兼容模式下安装 HTC Sync 并安装 Windows 7 版本,在此之后我的 Eclipse 检测到该设备。

Hope it helps.

希望能帮助到你。

回答by Boe-Dev

try to connect to the device in cmd with adb shell, if you don't have enter the adb in you $PATH go to Android sdk folder and try it from there.

尝试使用 adb shell 在 cmd 中连接到设备,如果您没有在 $PATH 中输入 adb,请转到 Android sdk 文件夹并从那里尝试。

You also could check if your device is int the Device-Manager in windows, there it sould be under ADB Interface

您还可以检查您的设备是否在 Windows 中的设备管理器中,它应该在 ADB 接口下

Maybe also try this go in Eclipse to Run->Run Configurations and set the Target to Manual. Then you should be able to chouse your device

也许也可以尝试在 Eclipse 中运行 -> 运行配置并将目标设置为手动。然后你应该可以安装你的设备

回答by dwemthy

I had a similar issue with my HTC Evo. This articleworked for me, it involves booting your phone into recovery mode while plugged into USB and installing the driver from the device. I realize this is for a different device, but the same approach may work.

我的 HTC Evo 也有类似的问题。这篇文章对我有用,它涉及在插入 USB 时将手机启动到恢复模式并从设备安装驱动程序。我意识到这是针对不同的设备,但相同的方法可能有效。