UiAutomator quit before it successfully loaded

Hi,
I am trying to run a jenkins job for android, and I faced this type of problem :

The Appium webdriver instance is null. Thus the closure of the driver is skipped.

and

WARN org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: UiAutomator quit before it successfully launched) (WARNING: The server did not provide any stacktrace information)

Note that the appium is running fine and I have tried another jenkins job and it s working fine .

What is the reason behind that.

Thank you

share some code example. how you start in jenkins. when you start appium in code…

It seems You try to launch application before it closes sucessfully…
use
@AfterTest
public void done()
{
driver.quit();
}
and also in your desired capabilites
set.capabilities(“fullreset”,true);