https://www.cnblogs.com/imlvbu/p/7127940.html

要解决的问题: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_v1.4.16版本自动化适配android7.0系统的更多相关文章

  1. 【亲测】appium_v1.4.16版本自动化适配android7.0系统

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

  2. 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.a ...

  3. Appium适配Android7.0以上版本

    Appium适配Android7.0以上版本 测试机型: 华为荣耀V9 安卓版本: Android7.0 appium版本: 1.65 说明: 公司新采购了一批安卓机器,拿了其中一台华为荣耀V9跑之前 ...

  4. [Android Pro] Android7.0系统 关于Android获取流量计数TrafficStats.getUidRxBytes(uid)和TrafficStats.getUidTxBytes(uid)返回-1解决方案

    reference : http://blog.csdn.net/zhangyong7112/article/details/54574214 最近一个关于流量的项目在Android7.0系统的手机上 ...

  5. Android圆形头像,拍照后“无法加载此图片”的问题解决(适配Android7.0)

    Feature: 点击选择拍照或者打开相册,选取图片进行裁剪最后设置为圆形头像. Problem: 拍好照片,点击裁剪,弹Toast"无法加载此图片". Solution: 在裁剪 ...

  6. appium不支持Android7.0系统设备解决办法

    1. 找到appium的安装目录下的adb.js文件. 2. 打开adb.js,手动修改该文件下的内容: Adb.prototype.getPIDsByName=function(name,cb){ ...

  7. 【转】Android7.0适配心得

    本文出自:贾鹏辉的技术博客(http://www.devio.org) http://www.devio.org/2016/09/28/Android7.0%E9%80%82%E9%85%8D%E5% ...

  8. Android7.0新特性,及Android N适配

    新特性部分 Android 7.0 Nougat 提供新功能以提升性能.生产效率和安全性,主要新增了下面的新特性和优化: 一.新的Notification Android N 添加了很多新的notif ...

  9. Android应用图标微技巧,8.0系统中应用图标的适配

    现在已经进入了2018年,Android 8.0系统也逐渐开始普及起来了.三星今年推出的最新旗舰机Galaxy S9已经搭载了Android 8.0系统,紧接着小米.华为.OV等国产手机厂商即将推出的 ...

随机推荐

  1. lua中如何识别C语言中的struct

    不如用c写比较简单呢 都要在lua中解析好数据结构,不过也可以用ffi呢...proto.lua

  2. webpack的css,less,sass中使用绝对路径

    用法: 使用~表示绝对路径,如下: @import "~otherfile.scss" .yourClass { background: url('~img/wallpaper.p ...

  3. Printed Circuit Board (board)

    Printed Circuit Board (board) 题目描述 给出一个N个顶点的简单多边形,对于每个顶点,假如它和原点连成的线段只在这个顶点处和多边形相交,就称为满足要求的顶点.你的任务是输出 ...

  4. 用ServletContext做一个简单的聊天室

    这里主要是ServletContext的一个特性:ServletContext是一个公共的空间,可以被所有的客户访问.由此可见ServletContext比cookie和session的作用范围要大[ ...

  5. Installing patches on an ESXi 5.x by the command

    Purpose This article outlines the procedure for installing patches on an ESXi 5.x host from the comm ...

  6. linu触摸屏幕

    一..前提知识 1.Linux输入子系统(Input Subsystem): 在Linux中,输入子系统是由输入子系统设备驱动层.输入子系统核心层(Input Core)和输入子系统事件处理层(Eve ...

  7. 输出读入优化——QAQ

    #include<bits/stdc++.h> const int RN=1e5; ],*ip=ib+RN,ob[RN+],*op=ob; inline int gc(){ ip==ib+ ...

  8. UVALive 3507:Keep the Customer Satisfied(贪心 Grade C)

    VJ题目链接 题意: 知道n(n <= 8e6)个工作的完成所需时间q和截止时间d,你一次只能做一个工作.问最多能做多少工作? 思路: 首先很像贪心.观察发现如下两个贪心性质: 1)一定存在一个 ...

  9. Mongodb的学习整理(下)

    聚合 aggregate 聚合(aggregate)主要用于计算数据,类似sql中的sum().avg() 语法 db.集合名称.aggregate([{管道:{表达式}}]) 管道 管道在Unix和 ...

  10. hdu 5082(水题)

    Love Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...