2
當我嘗試運行我的robolectric測試時,由於Flurry方法它拋出了一個奇怪的異常。如何在Android上使用Flurry運行Robolectric
這是我遇到的錯誤。
java.lang.VerifyError: Expecting a stackmap frame at branch target 17
Exception Details:
Location:
com/flurry/android/FlurryAgent.init(Landroid/content/Context;Ljava/lang/String;)V @5: if_icmpge
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: b200 4f10 0aa2 000c b200 5012 06b8 007a
0x0000010: b12a c700 0dbb 0044 5912 11b7 0089 bf2b
0x0000020: c600 0a2b b600 8b9a 000d bb00 4159 1226
0x0000030: b700 86bf b800 822a 2bb8 006e a700 0d4d
0x0000040: b200 5012 012c b800 78b1
Exception Handler Table:
bci [52, 60] => handler: 63
at com.pepapp.MainApplication.onCreate(MainApplication.java:21)
at org.robolectric.internal.ParallelUniverse.setUpApplicationState(ParallelUniverse.java:140)
at org.robolectric.RobolectricTestRunner.setUpApplicationState(RobolectricTestRunner.java:433)
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:240)
at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:188)
at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:54)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:152)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
這是我MainApplication.java:21
FlurryAgent.setLogEnabled(true);
謝謝你的幫助。