[2.0.0] Android support: planned to be revised in 2.1.0 - no questions/bugs accepted

Asked by wu on 2019-11-01

i use sikulix-2.0.0 and want to use sikulix to connect the android phone, i download the adb and add the (adb path) in Path,
but i want to use the ide toos menu so i try to the option1

option1 : i add a new key name sikulixadb and the value is adb-path but use sikulix menu will tell me not find adb

use option3 : will sure connect the phone but run my code will error。

my code:

adbscr = ADBScreen.start("C:\\Users\\Andy\\Desktop\\adb\\adb.exe")
a = (r"C:\Users\Andy\Desktop\adb")
print(adbscr)
reg = adbscr.newRegion(0,0,1440,3132)
img = adbscr.capture(reg).getFile()
shutil.move(screenshot_return, os.path.join(a, '_return.png'))
print('ok')

the erroe :
 [error] ADBDevice: captureDeviceScreenMat: width or height differ from device values
[error] script [ sikulitemp-4120090980014491323 ] stopped with error in line 6
[error] java.lang.NullPointerException ( java.lang.NullPointerException )
[error] --- Traceback --- error source first
line: module ( function ) statement
6: main ( <module> ) img = adbscr.capture(reg).getFile()
[error] --- Traceback --- end --------------
[error] ADBClient: package adb not available: C:\Users\Andy\Desktop\2.0
[error] ADBClient: package adb not available: C:\Users\Andy\Desktop\2.0

if can i want to use option1 。 option3 also can answer me THX

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2019-11-04
Last query:
2019-11-04
Last reply:
2019-11-01
wu (chouhua) said : #1

supplement
i find the phone screen not open will appear The above error and i return connect the phone will appear new error code

[error] ADBDevice: captureDeviceScreenMat: width or height differ from device values
[error] script [ sikulitemp-4054804018099655090 ] stopped with error in line 6
[error] java.lang.NullPointerException ( java.lang.NullPointerException )
[error] --- Traceback --- error source first
line: module ( function ) statement
6: main ( <module> ) img = adbscr.capture(reg).getFile()
[error] --- Traceback --- end --------------

Best RaiMan (raimund-hocke) said : #2

I am sorry, but the Android support is planned to be revised in version 2.1.x somewhen beginning next year.

Until then I do not accept any bugs or any questions about oddities..

It either works or does not work - you have to accept as is.

Try to work with SikuliX against an emulator window.

wu (chouhua) said : #3

Thanks RaiMan, that solved my question.