Appium's Android 7.0 environment building

Source: Internet
Author: User

Appium running an error on Android 7.0 phone---------Failure [install_failed_already_exists:attempt to re-install Io.appium.settings Without first uninstalling.]

Workaround:

Enter the Appium installation directory and locate the Adb.js (D:\Program Files (x86) \appium\node_modules\appium\node_modules\appium-adb\lib]adb.js) in the directory

Adb.js in 1035 rows ( cause of error: This.shell ("PS" + name + "'", function (err, stdout) {Corresponding execution instruction is ps ' uiautomator ', Android7 does not support this command grid So the execution result is bad pid ' Uiautomator ')

This.shell ("PS" + name + "'", function (err, stdout) {  if (ERR) return CB (ERR);  Replace with  This.shell_grep ("PS", name, function (err, stdout) {  if (err) {  logger.debug ("No matching processes Found ");  Return CB (NULL, []);  } and add the Shell_grep function used above: ADB.prototype.shell_grep = function (cmd, grep, CB) {if (Cmd.indexof (' "') = = =-1) {cmd = '" ' + cmd + ‘"‘;} var execcmd = ' Shell ' + cmd + ' | grep ' + grep;this.exec (ExecCmd, CB);};

  

Appium's Android 7.0 environment building

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.