Parameters were incorrect

who can help me with an error, I have a class to test the UI (frontend), so I am using appium, language: java, and the IDE: inelliJ… and the error is as follows.

org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: Unable to parse remote response: Parameters were incorrect. We wanted {“required”:[“desiredCapabilities”],”optional”:[“requiredCapabilities”,”sessionId”,”id”,”sessionId”,”id”,”sessionId”,”id”,”sessionId”,”id”]} and you sent [“desiredCapabilities”,”capabilities”] Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:48’ System info: host: ‘haibu’, ip: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘4.18.0-25-generic’, java.version: ‘1.8.0_212’ Driver info: driver.version: AndroidDriver

And my class and my class has this :

@Before public void setUp() throws MalformedURLException {

    DesiredCapabilities capabilities = new DesiredCapabilities();     capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,"Android");     capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"866225038187890");     capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION,"7");     capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME,"UiAutomator1");     //capabilities.setCapability();      File file = new File("/home/haibu/Documentos", "app-debug.apk");     capabilities.setCapability("app", file.getAbsolutePath());     System.setProperty("webdriver.gecko.driver", "/home/haibu/Documentos/geckodriver");         AndroidDriver <AndroidElement> driver = new AndroidDriver <AndroidElement>( new URL("https://localhost:4723/wd/hub"),capabilities);      driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);     MobileElement siguiente = (MobileElement) driver.findElementsByAccessibilityId("saltar");     siguiente.click();  }