我刚把我的手机升级到Android,现在我的Robotium脚本不工作了。
当我调用时,它会引发以下异常:
solo = new ExtSolo(getInstrumentation(), getActivity(), this.getClass().getCanonicalName(), getName());
java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.bitbar.testdroid.monitor.ScreenshotService }
at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:2052)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:2160)
at android.app.ContextImpl.bindService(ContextImpl.java:2138)
at com.bitbar.recorder.extensions.ScreenshotUtils.<init>(ScreenshotUtils.java:50)
at com.bitbar.recorder.extensions.ExtSolo.<init>(ExtSolo.java:152)
at ie.eureka.moveit4.test.activity.SuperTest.setUp(SuperTest.java:176)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1873)有什么建议吗?
发布于 2015-08-04 08:23:59
在这个类"com.bitbar.recorder.extensions.ScreenshotUtils",中,com.bitbar.testdroid.monitor.ScreenshotService类被隐式调用。现在,您需要根据类名而不是意图中的过滤器显式调用服务。
https://stackoverflow.com/questions/31804119
复制相似问题