05-26 15:22:48.504 1003-1016/? I/TestRunner﹕
java.lang.RuntimeException: Could not launch intent Intent {
act=androID.intent.action.MAIN flg=0x14000000
cmp=com.cookbrite.dev/com.cookbrite.ui.HomeListActivity } within 45
seconds. Perhaps the main thread has not gone IDle within a reasonable
amount of time? There Could be an animation or something constantly
repainting the screen. Or the activity is doing network calls on
creation? See the threaddump logs. For your reference the last time
the event queue was IDle before your activity launch request was
1432668122421 and Now the last time the queue went IDle was:
1432668122421. If these numbers are the same your activity might be hogging the event queue.
堆栈跟踪是:
05-26 15:22:48.504 1003-1016/? I/TestRunner﹕ java.lang.RuntimeException: Could not launch intent Intent { act=androID.intent.action.MAIN flg=0x14000000 cmp=com.cookbrite.dev/com.cookbrite.ui.HomeListActivity } within 45 seconds. Perhaps the main thread has not gone IDle within a reasonable amount of time? There Could be an animation or something constantly repainting the screen. Or the activity is doing network calls on creation? See the threaddump logs. For your reference the last time the event queue was IDle before your activity launch request was 1432668122421 and Now the last time the queue went IDle was: 1432668122421. If these numbers are the same your activity might be hogging the event queue. at androID.support.test.runner.MonitoringInstrumentation.startActivitySync(MonitoringInstrumentation.java:274) at androID.test.InstrumentationTestCase.launchActivityWithIntent(InstrumentationTestCase.java:119) at androID.test.InstrumentationTestCase.launchActivity(InstrumentationTestCase.java:97) at androID.test.ActivityInstrumentationTestCase2.getActivity(ActivityInstrumentationTestCase2.java:104) at com.cookbrite.step2_functional.ui.homeList.HomeListFragmentLoadingTest.testLoadingSpinner(HomeListFragmentLoadingTest.java:40) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at androID.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) at androID.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) at androID.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) at com.cookbrite.util.BaseBlackBoxTest.doRunTest(BaseBlackBoxTest.java:300) at com.cookbrite.util.BaseBlackBoxTest.access05-26 15:22:48.135 1003-1018/? E/THREAD_STATE﹕ Thread[main,5,main] androID.graphics.Canvas.native_drawBitmap(Native Method) androID.graphics.Canvas.drawBitmap(Canvas.java:1160) androID.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:440) androID.graphics.drawable.RotateDrawable.draw(RotateDrawable.java:88) androID.graphics.drawable.LayerDrawable.draw(LayerDrawable.java:345) androID.Widget.Progressbar.onDraw(Progressbar.java:1052) androID.vIEw.VIEw.draw(VIEw.java:13944) androID.vIEw.VIEw.draw(VIEw.java:13825) androID.vIEw.VIEwGroup.drawChild(VIEwGroup.java:3086) androID.vIEw.VIEwGroup.dispatchDraw(VIEwGroup.java:2923) androID.vIEw.VIEw.draw(VIEw.java:13823) androID.vIEw.VIEwGroup.drawChild(VIEwGroup.java:3086) androID.vIEw.VIEwGroup.dispatchDraw(VIEwGroup.java:2923) androID.vIEw.VIEw.draw(VIEw.java:13947) androID.vIEw.VIEw.draw(VIEw.java:13825) androID.vIEw.VIEwGroup.drawChild(VIEwGroup.java:3086) androID.vIEw.VIEwGroup.dispatchDraw(VIEwGroup.java:2923) androID.vIEw.VIEw.draw(VIEw.java:13823) androID.vIEw.VIEwGroup.drawChild(VIEwGroup.java:3086) androID.vIEw.VIEwGroup.dispatchDraw(VIEwGroup.java:2923) androID.vIEw.VIEw.draw(VIEw.java:13947) androID.Widget.FrameLayout.draw(FrameLayout.java:467) androID.vIEw.VIEw.draw(VIEw.java:13825) androID.vIEw.VIEwGroup.drawChild(VIEwGroup.java:3086) androID.vIEw.VIEwGroup.dispatchDraw(VIEwGroup.java:2923) androID.vIEw.VIEw.draw(VIEw.java:13823) androID.vIEw.VIEwGroup.drawChild(VIEwGroup.java:3086) androID.vIEw.VIEwGroup.dispatchDraw(VIEwGroup.java:2923) androID.vIEw.VIEw.draw(VIEw.java:13947) androID.Widget.FrameLayout.draw(FrameLayout.java:467) com.androID.internal.policy.impl.PhoneWindow$DecorVIEw.draw(PhoneWindow.java:2224) androID.vIEw.VIEwRootImpl.drawSoftware(VIEwRootImpl.java:2482) androID.vIEw.VIEwRootImpl.draw(VIEwRootImpl.java:2395) androID.vIEw.VIEwRootImpl.performDraw(VIEwRootImpl.java:2239) androID.vIEw.VIEwRootImpl.performTraversals(VIEwRootImpl.java:1872) androID.vIEw.VIEwRootImpl.doTraversal(VIEwRootImpl.java:1004) androID.vIEw.VIEwRootImpl$TraversalRunnable.run(VIEwRootImpl.java:5481) androID.vIEw.Choreographer$CallbackRecord.run(Choreographer.java:749) androID.vIEw.Choreographer.doCallbacks(Choreographer.java:562) androID.vIEw.Choreographer.doFrame(Choreographer.java:532) androID.vIEw.Choreographer$FramedisplayEventReceiver.run(Choreographer.java:735) androID.os.Handler.handleCallback(Handler.java:730) androID.os.Handler.dispatchMessage(Handler.java:92) androID.os.Looper.loop(Looper.java:137) androID.app.ActivityThread.main(ActivityThread.java:5103) java.lang.reflect.Method.invokeNative(Native Method) java.lang.reflect.Method.invoke(Method.java:525) com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:553) dalvik.system.NativeStart.main(Native Method) Thread[Binder_2,main] dalvik.system.NativeStart.run(Native Method) Thread[JDWP,system] dalvik.system.NativeStart.run(Native Method) Thread[pool-1-thread-1,main] java.lang.Object.wait(Native Method) java.lang.Object.wait(Object.java:364) androID.app.Instrumentation.startActivitySync(Instrumentation.java:403) androID.support.test.runner.MonitoringInstrumentation.access1(MonitoringInstrumentation.java:69) androID.support.test.runner.MonitoringInstrumentation.call(MonitoringInstrumentation.java:265) androID.support.test.runner.MonitoringInstrumentation.call(MonitoringInstrumentation.java:262) java.util.concurrent.FutureTask.run(FutureTask.java:234) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) java.lang.Thread.run(Thread.java:841) Thread[pool-5-thread-1,main] dalvik.system.VMStack.getThreadStackTrace(Native Method) java.lang.Thread.getStackTrace0(BaseBlackBoxTest.java:44) at com.cookbrite.util.BaseBlackBoxTest.call(BaseBlackBoxTest.java:271) at java.util.concurrent.FutureTask.run(FutureTask.java:234) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) at java.lang.Thread.run(Thread.java:841)
由上述超时触发的线程转储显示Progressbar似乎涉及:
解决方法 我认为你不能真正测试进度条,看它们是否完成.我们使用进度条来表示我们在多大程度上及时(例如30天周期中的第7天,因此我们的进度条从未完成).为避免此问题,我们必须为我们的应用程序使用不同的API级别.我们似乎只对API级别为21的仿真器出现此问题.一旦我们将仿真器切换到API级别19,我们的测试就成功了.
注意:我们在使用普通视图更改progressbar方面也取得了一些成功,但我们认为这比我们喜欢的更糟糕.
总结以上是内存溢出为你收集整理的android – 具有不确定ProgressBar的UI的“java.lang.RuntimeException:无法启动intent”全部内容,希望文章能够帮你解决android – 具有不确定ProgressBar的UI的“java.lang.RuntimeException:无法启动intent”所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)