startApplication() may fail to launch the Android application.
In such a case, please check/try the following points:
Make sure Android Studio is not running.
If the Android simulator needs to be used, do not start it from Android Studio, instead launch it via
android-sdk/emulator/emulator -avd avd-file(or similar).
In the Squish IDE check the "Runner/Server Log" view for any error messages, in particular ones related to instrumentation.
--clear-app-settingsto the "Launcher Arguments" field in the test suite settings. (Found to help with Samsung devices.)
Stop/kill an already running AUT by manually removing it from the Recent Apps list, or by executing "adb shell am force-stop com.example.YourApp" (using the "adb" shipping with Squish, in folder
SQUISH_DIR/bin; can be executed from the test script too).
Increase "Maximum Startup Time" (in the Squish IDE) at Edit > Server Settings > Application Behavior.
Consider disabling Google Play Protect if it prevents automatic deployment of the app on the device. (Found to help with Samsung devices.)