Please read it carefully and carefully. . . . If you have any questions, please leave a message and contact us
Baidu searched for a lot of solutions, either the version was too old or the solution was not feasible: for example
Invalid method one: Setting
'skipServerInstallation': True
'skipDeviceInitialization': True
Ineffective method two: modify the source code
The driver.js file under C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-driver\lib file;
The driver.js file under C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-driver\build\lib file;
Final solution: Check the official website and use Google Translate to check the usage.
Set the parameter of platformName to UiAutomator1 to solve the problem
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "UiAutomator1");