I am trying to run java sript on real androi device(marshmallow) appium (1.4.16.1) i am getting error “org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: No app set; either start appium with --app or pass in an ‘app’ value in desired capabilities, or set androidPackage to launch pre-existing app on device) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 361 milliseconds”
@alwayspriti, this is a common question. Have you tried searching through the past questions yet?
Also, it’s helpful if you provide information concerning your problem other than the error message. For example, did you verify your capabilities were properly set? If not, what happened when you set them? What does the appium server log show?
The APK path is for the .apk file located on the computer where your real device is connected. You may be able to launch the version of the application installed on the device by passing in the appPackage and appActivity in your appium capabilities (only on android), though I haven’t tested that myself.