I am not able to use UIAutomator2
when I set automationName as UiAutomator1 in DesiredCapabilities it works, But when I mention UiAutomator2 it throws an error:
{ "udid": "c8bc7843", "deviceName": "c8bc7843", "platformName": "Android", "platformVersion": "7", "noReset": true, "fullReset": false, "automationName": "UiAutomator2", "appPackage": "com.makemytrip", "appActivity": "com.mmt.travel.app.home.ui.SplashActivity" }
Error Details:
An unknown server-side error occurred while processing the command.
Original error: Error executing adbExec.
Original error: 'Command 'C:\\Users\\abc\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s c8bc7845
install -r
C:\\Users\\abc\\AppData\\Local\\Programs\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-debug-androidTest.apk' exited with code 1';
Stderr:
'adb: failed to install
C:\Users\abc\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk:
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES:
Failed to collect certificates from /data/app/vmdl1885703177.tmp/base.apk:
META-INF/CERT.SF has invalid digest for javax/annotation/meta/Exclusive.java in /data/app/vmdl1885703177.tmp/base.apk]';
Code: '1'