模拟器连接
,则意味着PC的adb 版本和模拟器的adb 版本不匹配,处理方法为:
1、将模拟器的nox_adb.exe路径添加至环境变量中;
2、将PC的adb.exe复制后更名为nox_adb.exe,将模拟器bin目录下的nox_adb.exe替换;
再次尝试如图:
作者:Antus
链接:https://www.jianshu.com/p/07c738eebcc1
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
adb devices返回为空问题,使得模拟器nox_adb.exe和appium的adb.exe保持版本一致:https://pcedu.pconline.com.cn/1515/15154706.html
替换完模拟器安装目录的adb.exe
CMD运行
C:\Users\Admin>adb devices
List of devices attached
127.0.0.1:11509 device
然后运行
C:\Users\Admin>D:\LenovoSoftstore\Install\lianxiangmoniqi\Lenovo\FusionEngine\LEmu\adb.exe connect 127.0.0.1:11509
already connected to 127.0.0.1:11509
获取appPackage和appActivity数据:https://baijiahao.baidu.com/s?id=1584277431206171374&wfr=spider&for=pc
{
“platformName”: “Android”,
“platformVersion”: “7.1.2”,
“deviceName”: “127.0.0.1:11509 device”,
“appPackage”: “cn.xuexi.android”,
“appActivity”: “com.alibaba.android.rimet.biz.privacy.PrivacyShowDialogActivity”
}
{
“platformName”: “Android”,
“platformVersion”: “7.1.2”,
“deviceName”: “127.0.0.1:11509 device”,
“appPackage”: “cn.xuexi.android”,
“appActivity”: “com.alibaba.android.rimet.biz.privacy.PrivacyShowDialogActivity”,
“noReset”: “True”
}