今天用appium链接真机时,碰到的第一个问题:Attempt to re-install io.appium.settings without first uninstalling.(这是日志中显示的报错信息)

解决办法:还在找原因,后续更新进来。

百度找到答案了,测试后,就没有再出现这个报错了。

appium_server_v1.4.16版本不适配android7.0系统,运行报错“Attempt to re-install io.appium.settings without first uninstalling”

 

要解决的问题:appium在androidV7.0系统上运行时报错 Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.settings without first uninstalling.]

原因分析:appium的uiautomator版本与androidV7.0不适配。

预置条件:手机端已经安装完Appium Settings 和 Unlock两个应用

解决步骤:1.修改源码文件-注释安装appiumSettings和unlock的两行代码

文件路径: C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android.js

2.修改源码文件如下:

a.打开  \Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js

b.在adb.js的1035行找到

     this.shell("ps '" + name + "'", function (err, stdout) {

     if (err) return cb(err);
     替换成
     this.shell_grep("ps", name, function (err, stdout) {
     if (err) {
     logger.debug("No matching processes found");
     return cb(null, []);
    }
           并增加上面用到的shell_grep函数:

    ADB.prototype.shell_grep = function (cmd, grep, cb) {
    if (cmd.indexOf('"') === -1) {
    cmd = '"' + cmd + '"';
    }
   var execCmd = 'shell ' + cmd + '| grep ' + grep;
   this.exec(execCmd, cb);
   };

3.重启appium

appium 链接真机运行时报错的更多相关文章

  1. appium 链接真机后,运行代码,但是APP并没有启动

    要淡定,链接真机后,问题一下多出来这么多,还没有启动程序,就碰到接二连三的问题. 爽到家了.慢慢解决吧. 具体问题是这样的: # coding=utf-8from appium import webd ...

  2. iOS 真机测试时报错:Provisioning profile "iOS Team Provisioning Profile: XXX” doesn't include the currently selected device “XXX”.

    这几天因工作需要,去给客户演示iOS项目打包的过程.之前演示都是顺利的,但后来客户自己操作时打电话说遇到了问题,出现报错. 就过去看了一下,发现一个很陌生的错误提示: The operation co ...

  3. appium+python自动化测试真机测试时报错“info: [debug] Error: Could not extract PIDs from ps output. PIDS: [], Procs: ["bad pid 'uiautomator'"]”

    刚开始启动服务时,弹出授权提示,以为是手机app权限问题,后来debug后,发现了一个警告日志:UiAutomator did not shut down fast enough, calling i ...

  4. appium 链接真机

    1. 安装驱动 说明:如果驱动装不上,可以使用第三方的工具去安装.(一般来说还是用第三方) 这里推荐锤子科技的HandShaker, 地址:http://www.smartisan.com/apps/ ...

  5. xcode6 真机运行报错 Command /usr/bin/codesign failed with exit code 1

    解决方法: 百度下载‘iphone配置实用工具’, 打开此软件之后,选择预配置描述文件, 选中iphone过期和重复的描述文件,按delete键删除.然后重启xcode即可

  6. Swift真机调试时报错dyld: Library not loaded: @rpath/libswiftCore.dylib

    dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/mobile/Containers/ ...

  7. Xcode真机运行报错iPhone has denied the launch request

    1.打开钥匙串 ->Apple Worldwide Developer Relations Certification Authority ->双击 并点击信任->选择使用系统默认2 ...

  8. Xcode真机调试报错(证书的签发者无效)

    Xcode真机调试时报错: dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib Referenced from: /var/mobi ...

  9. python+appium 【已解决】真机运行appium报错“WebDriverException: Message: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c.......详见内文

    问题报错提示: selenium.common.exceptions.WebDriverException: Message: A new session could not be created. ...

随机推荐

  1. js中打地鼠游戏

    <!DOCTYPE html><html lang=""><head> <mata charset = "utf-8" ...

  2. linux下载文件到本地命令

    版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/mengda_lei/article/de ...

  3. CodeForce-1196D1-RGB Substring (easy version)

    原题链接 题目大意: 给出一串由'R', 'G', 'B'组成的长度为n的字符串,在里面选出一个长度为k的子串,要求在改变最少字符的情况下同时也是"RGBRGBRGB…"的子串. ...

  4. VC6.0在Win8,10下的兼容性调整

    Microsoft Visual C++ 6.0,简称VC6.0,是微软推出的一款C++编译器,将“高级语言”翻译为“机器语言(低级语言)”的程 序.Visual C++是一个功能强大的可视化软件开发 ...

  5. js的浏览器判断方法

    使用navigator.userAgent来判断浏览器类型. 1.浏览器版本号函数: var br=navigator.userAgent.toLowerCase();   var browserVe ...

  6. 爬虫-ajax请求遇到Unicode编码问题

    2018-08--4爬取金色财经网页 网址:https://www.jinse.com/search/EOS 第一步:我观察了网页:发现了网页是一个发送ajax请求的网页,发现如下: 然后 我就先爬取 ...

  7. 插件化框架解读之so 文件加载机制(四)

    阿里P7移动互联网架构师进阶视频(每日更新中)免费学习请点击:https://space.bilibili.com/474380680 提问 本文的结论是跟着 System.loadlibrary() ...

  8. 50-python基础-python3-列表-函数sorted() 对列表进行临时排序

    sorted()函数对列表进行临时排序,返回排序后的列表: 区别列表方法sort()原地修改,无返回值. 1-要保留列表元素原来的排列顺序,同时以特定的顺序呈现它们,可使用函数sorted() . 2 ...

  9. A - Max Sum Plus Plus (好题&&dp)

    A - Max Sum Plus Plus  I think you have got an AC in Ignatius.L's "Max Sum" problem. To be ...

  10. 【摘】Linux虚拟地址空间布局以及进程栈和线程栈总结

    在CSDN上看到的一篇文章,讲的还是满好的. 原文地址:Linux虚拟地址空间布局以及进程栈和线程栈总结 一:Linux虚拟地址空间布局 (转自:Linux虚拟地址空间布局) 在多任务操作系统中,每个 ...