每当我试着跑adb devices:

            $ adb devices
            * daemon not running. starting it now *
            * daemon started successfully *
            List of devices attached
            HT0ANRV05740    device

它表示守护进程未运行,并重新启动守护进程.

然后,如果我再次运行adb设备,它会做同样的事情-

            $ adb devices
            adb server is out of date.  killing...
            * daemon started successfully *
            List of devices attached
            HT0ANRV05740    device

然后,如果我再次运行它,它会再次执行完全相同的操作-

            $ adb devices
            adb server is out of date.  killing...
            * daemon started successfully *
            List of devices attached
            HT0ANRV05740    device

请帮帮忙!!

另外,我的DDMS一直给我以下信息-

[2011-02-23 16:17:05 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host

以下是adb重启前的日志(log)-

              1291        locapi_rpc_glue  V  loc_ioctl
              1291                    RPC  D  written RPC packet size: [480]
              1291                    RPC  D  read RPC packet
              1291                    RPC  D  read RPC packet size: [28]
              1291             lib_locapi  V  qct_loc_eng_inject_xtra_data, inject part = 100, len = 167, len = 167
              1291             lib_locapi  V  qct_loc_eng_inject_xtra_data, total part = 100, len = 167
              1291        locapi_rpc_glue  V  loc_ioctl
              1291                    RPC  D  written RPC packet size: [248]
              1291                    RPC  D  read RPC packet
              1291                    RPC  D  read RPC packet size: [28]
              1291             lib_locapi  D  qct_loc_eng_inject_xtra_data: injected 39767, SUCCESS
              1291             lib_locapi  V  inject_xtra_waiting = flase
              1291    GpsLocationProvider  D  Releasing wakelock
              1291            WifiService  D  releaseWifiLockLocked: WifiLock{NetworkLocationProvider type=2 binder=android.os.Binder@47aead50}
              1291            WifiService  D  enable and start wifi due to updateWifiState
              1218            rmt_storage  I  rmt_storage open event
              1218            rmt_storage  I  rmt_storage client thread started
              1218            rmt_storage  I  rmt_storage events processing done
              1218            rmt_storage  I  rmt_storage register cb event
              1218            rmt_storage  I  rmt_storage status id = 2
              1218            rmt_storage  I  rmt_storage events processing done
              1218            rmt_storage  I  rmt_storage open event
              1218            rmt_storage  I  rmt_storage client thread started
              1218            rmt_storage  I  rmt_storage events processing done
              1218            rmt_storage  I  rmt_storage register cb event
              1218            rmt_storage  I  rmt_storage status id = 2
              1218            rmt_storage  I  rmt_storage events processing done
              1218            rmt_storage  I  rmt_storage write event
              1218            rmt_storage  I  unblock rmt_storage client thread
              1218            rmt_storage  I  rmt_storage events processing done
              1218            rmt_storage  I  rmt_storage write: bytes written = 3145216
              1218            rmt_storage  I  rmt_storage write: bytes written = 512
              1218            rmt_storage  I  rmt_storage status handle = 1
              1291       BatteryStatsImpl  I  notePhoneSignalStrengthLocked: 4->3
              1218            rmt_storage  I  rmt_storage write event
              1218            rmt_storage  I  rmt_storage events processing done
              1218            rmt_storage  I  unblock rmt_storage client thread
              1291    PowerManagerService  D  New lightsensor value:40, lcdValue:143
              1291    PowerManagerService  D  lightSensorChangedLocked, buttonValue >= 0, mPowerState = 3
              1218            rmt_storage  I  rmt_storage write: bytes written = 3145216
              1218            rmt_storage  I  rmt_storage write: bytes written = 512
              1218            rmt_storage  I  rmt_storage status handle = 2
              1291                    RPC  D  read RPC packet
              1291                    RPC  D  read RPC packet size: [80]
              1291        locapi_rpc_glue  V  Callback received: 80 (cb_id=0x50B0000 handle=1)
              1291                    RPC  D  written RPC packet size: [28]
              1470   usicWidgetController  D  unbindMusicPlaybackService()
              1707   MediaPlaybackService  E  BadQueue mPlayListLen : 0 mAlbumListLen : 0 mShrinkAlbumListLen : 0
              1291    NotificationService  V  Battery Full, Charging
              1291                 lights  E  write ok string=0,len=1
              1291                 lights  E  write ok string=0,len=1
              1291                 lights  E  write ok string=0 0,len=3
              1291                 lights  E  write ok string=1,len=1
              1707       MediaPlayer.java  D  setOnCompletionListener being cleaned to null
              1291                 lights  E  write ok string=0,len=1
              1291                 lights  E  write ok string=0 0,len=3
              1291    NotificationService  V  Turn off Jogball/OJ LED
              1291    NotificationService  D  cancelNotification, ACTION_NOTIFICATION_REMOVE,pkg=com.htc.music,id=1
              1291           AudioService  I   AudioFocus  abandonAudioFocus() from android.media.AudioManager@476ddee0com.htc.music.MediaPlaybackService$5@476dd838

推荐答案

我从计算机上卸载了Dell PC Suite和HTC Sync,此问题消失了.

EDIT:来详细说明这个问题的原因:HTC sync自带一台ADB服务器.它会更新PATH环境变量以指向其服务器版本.编辑PATH变量并删除对HTC Sync目录的引用.现在你又在使用谷歌的ADB了.

Android相关问答推荐

Jetpack编写:通过viewModels()vs viewModel View ModernName()'

约束布局:垂直链中的视图应将内容包裹到空间的1/3

Android和Rust,OpenSSL交叉编译在ARM V7上链接失败

在内部创建匿名对象的繁忙循环调用函数会产生开销吗?

如何在Jetpack Compose中将对象的移动从一个路径平滑地切换到另一个路径?

如何在Jetpack Compose中创建这个圆形?

可组合函数无限地从视图模型获取值

同样的参数值下,为什么requiredSizeIn不等于requiredWidthIn + requiredHeightIn?

错误:无法安装应用程序:INSTALL_PARSE_FAILED_MANIFEST_MALFORMED (React-Native-Android-Studio)

具有管理员权限的 Kotlin 中的多用户系统

如何像 XML 一样在 Compose Android Studio 中折叠/展开小部件代码区域/区域

如何使用 Jetpack Compose 制作两个圆圈

每次在 Jetpack Compose 中调用导航

ionic - capacitor - Android 风味 - 无法在模拟器或真实设备中运行应用程序

获取模板向导配方类 Intellij 中的应用程序包名称

在 Room 中创建一对多关系时,@Relation 类是什么意思?

Jetpack Compose Material3 - switch 标签

WearOS - 有没有办法从心电图传感器收集原始数据?

ObjectBox,如何在冲突中放弃一切迁移?

等到上一个事件完成 Rx