Android Lollipop,Robotium 脚本不工作。获取服务意图必须显式 act=com.bitbar.testdroid.monitor.ScreenshotService
Android Lollipop, Robotium script not working. Getting Service Intent must be explicit act=com.bitbar.testdroid.monitor.ScreenshotService
我刚刚将 phone 升级到 Android Lollipop,现在我的 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)
有什么建议吗?
在此class "com.bitbar.recorder.extensions.ScreenshotUtils"中,com.bitbar.testdroid.monitor.ScreenshotService class 被隐式调用。您现在需要通过 class 名称而不是通过 Intent 中的过滤器显式调用该服务。
我刚刚将 phone 升级到 Android Lollipop,现在我的 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)
有什么建议吗?
在此class "com.bitbar.recorder.extensions.ScreenshotUtils"中,com.bitbar.testdroid.monitor.ScreenshotService class 被隐式调用。您现在需要通过 class 名称而不是通过 Intent 中的过滤器显式调用该服务。