Unable to run Android test

I am using java-client 4.1.2 and Appium Server 1.7.2. But my test are not working some how it is not able to find the element. When I inspect I can tap the element and do everything. There is version compatibility issue between java client and appium. Can some one please help me with correct compatible version.

I dont know some how my test were working fine but I don’t remember the previous version of appium which I was using.

Please update to latest java-client version 6.1.0 and appium server.

We no more support that version of client n server

I know but I have swipe and bypolling method are used everywhere in my code if I update it to latest java-client then my code starts breaking . Can you suggest best appium server version which is compatible with java client 4.1.2

i think you can use java client 5.0.4 with appium 1.7.2. may be this can help you.

@Tany_S I have already tried that but swipe method has been deprecated from version 5.0.4

i have never tried with java client 4.1.2 because of some scroll issue. So, if you want to use java client 5.0.4 u can you use below swiping method. in new java client swiping and scrolling working fine with no issue.

public void swiperighttoleft() {
Dimension size = webDriver.manage().window().getSize();
int startx = (int) (size.width *0.94);
int endx = (int) (size.width *0.24);
int starty = size.height / 2;
int finalendx = startx-endx;
int endy = 0;
(new TouchAction(webDriver)).press(startx,starty).moveTo(-finalendx,endy).release().perform();