我按照此post中的步骤尝试连接到我的Motorola X Gen 2,以便在OS X El Cap上进行Wifi调试。
我用usb线将手机连接到笔记本电脑, 我杀了并启动了服务器,服务器已成功启动,然后在:
./adb devices
我得到了
List of devices attached
TA44909GA0 device
然后我做了
./adb tcpip 5555
我试过
./adb connect <IP addr of my phone>:5555
两者都连接和断开USB电缆,没有一个工作。两者都返回错误消息:
unable to connect to ***.***.***.***:5555: Operation timed out
我无法弄清楚这里发生了什么,我尝试了Android Studio插件ADB WIFI,它返回了相同的消息,操作超时。我重新启动了一切,尝试使用不同的电缆进行连接,所有这些都没有用。
有谁知道这里发生了什么?
答案 0 :(得分:9)
确保您的计算机和Android设备使用相同的wifi网络。我有同样的问题,并在更改为相同的wifi后修复它。
答案 1 :(得分:2)
我认为这可能会有所帮助......
用于Windows运行cmd来自&#34;作为管理员&#34; 那么
select
a.Auditfieldid,
a.CompanyRuleID,
a.CompanyRule,
a.VipUsername,
a.EffectiveDate,
a.AccountHolderOldValue,
a.AccountHolderNewValue,
b.AccountNoOldValue,
b.AccountNoNewValue,
c.AccountTypeOldValue,
c.AccountTypeNewValue,
d.BankOldValue,
d.BankNewValue,
e.BranchOldValue,
e.BranchNewValue
from
(
select
Auditfieldid,
CompanyRuleID,
CompanyRule,
VipUsername,
EffectiveDate,
AccountHolderOldValue,
AccountHolderNewValue
from
SageStaging.MASSMART.AuditCondensed
where
FieldName = 'Account Holder Name'
) a
join
(
select
Auditfieldid,
CompanyRuleID,
CompanyRule,
VipUsername,
EffectiveDate,
AccountNoOldValue,
AccountNoNewValue
from
SageStaging.MASSMART.AuditCondensed
where
FieldName = 'Account Number'
) b
on
a.Auditfieldid = b.Auditfieldid and
a.CompanyRuleID = b.CompanyRuleID and
a.CompanyRule = b.CompanyRule and
a.VipUsername = b.VipUsername and
a.EffectiveDate = b.EffectiveDate
join
(
select
Auditfieldid,
CompanyRuleID,
CompanyRule,
VipUsername,
EffectiveDate,
AccountTypeOldValue,
AccountTypeNewValue
from
SageStaging.MASSMART.AuditCondensed
where
FieldName = 'Account Type'
) c
on
a.Auditfieldid = c.Auditfieldid and
a.CompanyRuleID = c.CompanyRuleID and
a.CompanyRule = c.CompanyRule and
a.VipUsername = c.VipUsername and
a.EffectiveDate = c.EffectiveDate
join
(
select
Auditfieldid,
CompanyRuleID,
CompanyRule,
VipUsername,
EffectiveDate,
BankOldValue,
BankNewValue
from
SageStaging.MASSMART.AuditCondensed
where
FieldName = 'Bank'
) d
on
a.Auditfieldid = d.Auditfieldid and
a.CompanyRuleID = d.CompanyRuleID and
a.CompanyRule = d.CompanyRule and
a.VipUsername = d.VipUsername and
a.EffectiveDate = d.EffectiveDate
join
(
select
Auditfieldid,
CompanyRuleID,
CompanyRule,
VipUsername,
EffectiveDate,
BranchOldValue,
BranchNewValue
from
SageStaging.MASSMART.AuditCondensed
where
FieldName = 'Bank Branch'
) e
on
a.Auditfieldid = e.Auditfieldid and
a.CompanyRuleID = e.CompanyRuleID and
a.CompanyRule = e.CompanyRule and
a.VipUsername = e.VipUsername and
a.EffectiveDate = e.EffectiveDate;
对于Mac用户
答案 2 :(得分:1)
尝试在Android设备监视器中增加超时。
来自Android Studio:工具 - &gt; Android-&gt; Android设备监视器 在Android设备监视器中: Window-&gt;偏好设置,Android-&gt; DDMS。
在DDMS窗口中,增加&#34; ADB连接超时(ms)&#34;。默认为5000毫秒。如果您的应用程序特别大/需要很长时间才能加载,它可能会超过此超时时间,因此增加可能会修复它。
答案 3 :(得分:1)
所以在经过大量的试验后,我认为这个问题在某种程度上与wifi有关,我认为这个功能不适用于WPA2(或任何类型的?)企业加密,因为我使用的是我的学校Wifi,它对于我用另一台笔记本电脑设置的热点,结果没问题,正常运行。
答案 4 :(得分:1)
如果您连接在同一网络上,但仍然无法连接,请检查IP两次。有时会改变。 检查您的IP =电话设置->关于电话->状态-> IP地址
答案 5 :(得分:0)
什么为我解决了这个问题
(同时):
adb kill-server
adb start-server
然后按照“标准”过程进行操作。