夜神模拟器127.0.0.1:62001: 由于目标 计算机积极拒绝,无法连接 解决方法
dos下,进入进Android SDK下的platform-tools目录
代码:
adb connect 127.0.0.1:62001
当出现链接失效时,且提示:adb unable to connect to 127.0.0.1:62001: cannot connect to 127.0.0.1:6200: 由于目标 计算机积极拒绝,无法连接。
开始查找原因:
1)关闭AS和夜神进程
2)cmd下输入 adb version为1.039
3)cmd下输入 Nox_adb version为1.036(PS:输入此命令前提是需要将夜神模拟器中的bin路径添加到path环境变量中)
4)通过版本比对发现AS的版本比夜神版本高,究其原因需要将二者版本整为一致。
5)将AS的adb.exe拷贝至夜神bin目录下,并将adb.exe修改为Nox_adb.exe
6)开启夜神模拟器,在cmd下输入adb devices,此时并显示
List of devices attached
127.0.0.1:62001 device
至此问题已解决。
appium配置示例
{
"platformName": "Android",
"platformVersion": "4.4.2",
"deviceName": "127.0.0.1:62001",
"app":"E:/dev_doc/appium/txnews.apk",
"appPackage": "com.tencent.news",
"appActivity": "com.tencent.news.activity.SplashActivity"
}
{
"platformName": "Android",
"platformVersion": "4.4.4",
"deviceName": "3082f5da",
"app":"E:/dev_doc/appium/txnews.apk",
"appPackage": "com.tencent.news",
"appActivity": "com.tencent.news.activity.SplashActivity",
"noReset": true
}
第1眼新闻
{
"platformName": "Android",
"platformVersion": "4.4.2",
"deviceName": "127.0.0.1:62001",
"app":"E:/dev_doc/appium/firsteye.apk",
"appPackage": "com.cdvcloud.firsteye",
"appActivity": "com.cdvcloud.firsteye.ui.activity.SplashActivity"
}
{
"platformName": "Android",
"platformVersion": "5.1",
"deviceName": "192.168.193.101:5555",
"app":"E:/dev_doc/appium/shangyounews.apk",
"appPackage": "com.news.shangyounews",
"appActivity": "com.news.shangyounews.vpb.ad.AdActivity"
}
西瓜视频
{
"platformName": "Android",
"platformVersion": "5.1",
"deviceName": "192.168.74.101:5555",
"app": "F:/YIDEAWorker/ximonitor/apk/xiguanews.apk",
"appPackage": "com.ss.android.article.video",
"appActivity": "com.ss.android.article.video.activity.SplashActivity"
}
趣头条
{
"platformName": "Android",
"platformVersion": "5.1",
"deviceName": "192.168.89.101:5555",
"app": "F:/dev_doc/appium/qutoutiao.apk",
"appPackage": "com.jifen.qukan",
"appActivity": "com.jifen.qkbase.main.MainActivity"
}
一点资讯
{
"platformName": "Android",
"platformVersion": "5.1",
"deviceName": "192.168.89.101:5555",
"app": "F:/dev_doc/appium/yidianzixun.apk",
"appPackage": "com.hipu.yidian",
"appActivity": "com.yidian.news.ui.guide.UserGuideActivity"
}
注意事项:“Files successfully copied to: /sdcard/Download”
看这里,看这里
文章总目录:博客导航
参考文章:https://blog.csdn.net/u_ascend/article/details/80592389
参考文章:https://blog.csdn.net/w605283073/article/details/70597368