appium=== error failure [install_failed_already_exists:attempt to re-install Io.appium.settings without first Uninstalling. The solution

Source: Internet
Author: User
Tags appium

Problem to solve: Appium run times error Failure on androidV7.0 system [install_failed_already_exists:attempt to re-install Io.appium.settings Without first uninstalling.]

Cause Analysis: The uiautomator version of Appium is not suitable for androidV7.0.

Pre-set conditions: Mobile phone end has been installed Appium Settings and unlock two applications

Resolution steps: 1. Modify the source file-note two lines of code to install Appiumsettings and unlock

File path: C:\Program files (x86) \appium\node_modules\appium\lib\devices\android\android.js

2. Modify the source file as follows:

A. Open \program Files (x86) \appium\node_modules\appium\node_modules\appium-adb\lib\adb.js

B. Found in line 1035 of Adb.js

     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. Restart Appium

appium=== error failure [install_failed_already_exists:attempt to re-install Io.appium.settings without first Uninstalling. The solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.