【问题标题】:Android 4.0 Debugging Issue - DDMS Error?Android 4.0 调试问题 - DDMS 错误?
【发布时间】:2012-05-24 15:02:12
【问题描述】:

我正在尝试调试 SipDemo SDK 示例。但是,DDMS 无法连接到模拟器上运行的应用程序(Android 4.0 API 级别 14)。模拟器等待调试,eclipse调试器无法打开端口。另外,ddms 报告 VM Debug 端口无法打开。

确认以下内容,

  1. 端口未被使用
  2. ADB 服务器/Eclipse/机器已重新启动
  3. 为 127.0.0.1 检查主机文件
  4. 已检查首选项以选择 127.0.0.1 作为 ADBHOST
  5. 为 Android 4.0 选择了合适的虚拟机
  6. 使用 Comodo 防火墙,所以在禁用防火墙后尝试调试。

应用程序期望的端口与调试器正在使用的端口存在差异。一个用于 Android 操作系统,一个用于运行 IDE 的实际主机?

图像和日志

设备进程窗口

http://imageshack.us/photo/my-images/94/androiddebugging.png

VM 调试端口错误(在 Eclipse 启动时)

http://imageshack.us/photo/my-images/820/vmdebugport8700.png

LogCat 视图

05-16 14:46:20.547: W/ActivityThread(1094): Application com.example.android.sip is waiting for the debugger on port 8100...

控制台

[2012-05-16 10:46:17 - SipDemo] Android Launch!
[2012-05-16 10:46:17 - SipDemo] adb is running normally.
[2012-05-16 10:46:17 - SipDemo] Performing com.example.android.sip.WalkieTalkieActivity activity launch
[2012-05-16 10:46:17 - SipDemo] Automatic Target Mode: Preferred AVD 'Android40' is available on emulator 'emulator-5554'
[2012-05-16 10:46:18 - SipDemo] Application already deployed. No need to reinstall.
[2012-05-16 10:46:18 - SipDemo] Starting activity com.example.android.sip.WalkieTalkieActivity on device emulator-5554
[2012-05-16 10:46:20 - SipDemo] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.android.sip/.WalkieTalkieActivity }
[2012-05-16 10:46:20 - SipDemo] Attempting to connect debugger to 'com.example.android.sip' on port 8630
[2012-05-16 10:46:40 - SipDemo] Launch error: Failed to connect to remote VM. Connection timed out.

【问题讨论】:

    标签: android android-emulator


    【解决方案1】:

    测试 SIP 应用程序

    要测试 SIP 应用程序,您需要以下内容:

    运行 Android 2.3 或更高版本的移动设备。 SIP 通过无线运行,因此您必须在实际设备上进行测试。 无法在 AVD 上进行测试。 一个 SIP 帐户。有许多不同的 SIP 提供商提供 SIP 帐户。 如果您要拨打电话,还必须拨打有效的 SIP 帐户。

    测试 SIP 应用程序:

    在您的设备上,连接到无线网络(设置 > 无线和网络 > Wi-Fi > Wi-Fi 设置) 设置您的移动设备以进行测试,如在设备上开发中所述。 在您的移动设备上运行您的应用程序,如在设备上开发中所述。 如果您使用的是 Eclipse,则可以使用 LogCat(Window > Show View > Other > Android > LogCat)在 Eclipse 中查看应用程序日志输出。

    http://developer.android.com/guide/topics/connectivity/sip.html

    【讨论】:

      猜你喜欢
      • 2012-01-04
      • 1970-01-01
      • 2012-07-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多