I want to start an uiautomatorTest program in android code. I use:
Runtime.getRuntime().exec("uiautomator runtest AutoRunner.jar -c com.Runner.AutoRunner");
I get the error:
java.lang.SecurityException: You do not have android.permission.RETRIEVE_WINDOW_CONTENT required to call registerUiTestAutomationService from pid=7071, uid=10156
Can anyone tell me how to solve the problem? thanks