Android 8.0 above solutions can not be opened appears uiautomatorviewer

1. When I use Android comes uiautomatorviewer tools for app element positioning, there was not open Android 9.0. The error message appears as shown below:

 

After Internet access, summarizes several methods to solve.

(1) Now the disc D under the root directory and a new screen.png screen.uix two files. ( This method must be closed appium, because uiautomatorviewer and appium will clash of ) open cmd then enter:

. (Interception uix resource file)

adb shell uiautomator dump /sdcard/screen.uix

adb pull /sdcard/screen.uix D:/pic/screen.uix

(Interception screenshot)

adb shell screencap -p /sdcard/screen.png

adb pull /sdcard/screen.png D:/pic/screen.png

Then open uiautomatorviewer, import both files

 

 

After the import is successful, there will be a phone screenshots. The positioning element can go through screenshots. But here, if you want to switch the screen positioning, then it and the need to continue some trouble in the import file. (This is not a perfect solution, but it will use)

 

 

(2) Other blog said through SDK Manager.exe, to install the corresponding version of the Android mobile phone package to resolve this problem. But after my practice did not solve, interested students can go to the next test.

 

 

 (3) If the first two can not solve this problem, it will only settle for the use of low version of the phone elements positioned. Low version is no problem, you can locate elements directly and does not require each cut plan in the guidance document.

 

(4) But if you do not have a low version of the phone, the phone can only be used Android8.0 and above the positioning of words. I recommend you to use Appium inspector, you can solve the problem of high Android version element positioning.

 After the first open appium, start the service. Click on the search symbol in the upper right corner, enter the following figure fill in the configuration information is saved.

 Then the answer is to click Start

 

 After starting the answer, just as in the diagram below. You can go to locate the elements, after switching mobile content only need to click the Refresh button to refresh synchronization.

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/jc-home/p/11894850.html