I am running into an issue with `until` method using appium through selenium webdriver. It throws this error

> 
> The method until(Function) in the type FluentWait is not applicable for the arguments (new Function(){})
> 
> 
> 

I followed every option from [prior posts](https://stackoverflow.com/questions/42421148/wait-untilexpectedconditions-doesnt-work-any-more-in-selenium) but none have worked.

Using Java 1.8, added pretty much every dependency in POM file.

```
public class AppInit {

    public static void setUp(AndroidDriver<AndroidElement> adriver) throws InterruptedException, MalformedURLException {
        ...........
        WebDriver driver;
        final WebDriverWait wait = new WebDriverWait(driver, 5);
        final By testXpath = By.xpath("////android.widget.Button[@content-desc='someid']");
        wait.until(ExpectedConditions.visibilityOfElementLocated(testXpath)).click();
   }

   public static void clickMenu() {
        WebDriver driver;
        new WebDriverWait(driver, 60).until(new Function<WebDriver, Boolean>() {
            Boolean isWindowFound = Boolean.FALSE;
            public Boolean apply(WebDriver driver) {
                try {
                   driver.switchTo().window("Your Window Name");
                   isWindowFound = Boolean.TRUE;
                } catch (NoSuchWindowException e) {
                   System.out.println("Your Window Name not found");
                   System.out.println(driver.getTitle());
                   return isWindowFound;
                }
                return isWindowFound;
            }
        });
    }

}

```