今天用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. selenium2-java 浏览器下进行登录

    完整代码实现如下: package linear; import org.openqa.selenium.By;import org.openqa.selenium.WebDriver;import ...

  2. 如何为mysql建立索引

    前些时候,一位颇高级的程序员居然问我什么叫做索引,令我感到十分的惊奇,我想这绝不会是沧海一粟,因为有成千上万的开发者(可能大部分是使用MySQL的)都没有受过有关数据库的正规培训,尽管他们都为客户做过 ...

  3. Linux查看硬件配置

    1.查看机器所有硬件信息:dmidecode |moredmesg |more 这2个命令出来的信息都非常多,所以建议后面使用"|more"便于查看 2.查看CPU信息 方法一: ...

  4. css缓存问题

    频繁更换样式,会导致样式缓存, 在实际项目开发过过程中,页面是上传到服务器上的.而为了减少服务器的压力,让用户少加载,浏览器会将图片.css.js缓存到本地中,以便下次访问网站时使用.这样做不仅减少了 ...

  5. Bootstrap 学习笔记3 路径分页标签和徽章组件

  6. upc组队赛16 GCDLCM 【Pollard_Rho大数质因数分解】

    GCDLCM 题目链接 题目描述 In FZU ACM team, BroterJ and Silchen are good friends, and they often play some int ...

  7. latex 查找缺失的库文件

    app-portage/pfl contains a program to search in an online database for a Gentoo package containing a ...

  8. QTP 通过URL地址下载文件到本地(转)

    While automation, you may come to situations where you need to need to download a file on clicking a ...

  9. for,while,do while语句区别以及常见死循环格式

    1.三种循环语句的区别: do...while循环至少执行一次循环体. 而for,while循环必须先判断条件是否成立,然后决定是否执行循环体语句. for循环和while循环的区别: 如果你想在循环 ...

  10. 牛客网挑战赛24 青蛙(BFS)

    链接:https://www.nowcoder.com/acm/contest/157/E来源:牛客网 有一只可爱的老青蛙,在路的另一端发现了一个黑的东西,想过去一探究竟.于是便开始踏上了旅途 一直这 ...