在尝试运行在后台调用 ShinobiControls 的 Robolectric 测试时,我遇到了这个奇怪的 VerifyError。我试过 -noverify 选项,但它似乎不起作用,或者我把它放在错误的地方。
我正在使用 Retrolambda、Java 8、Robolectric (3.0) 和 Shinobi Premium (1.8.0)。
java.lang.VerifyError: Expecting a stackmap frame at branch target 18
Exception Details:
Location:
com/shinobicontrols/charts/ChartFragment.onResume()V @8: ifnull
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: 2ab7 000b 2ab4 0006 c600 0a2a b400 06b6
0x0000010: 0012 b1
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at android.app.Fragment.instantiate(Fragment.java:611)
at android.app.Fragment.instantiate(Fragment.java:582)
at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2108)
at android.app.Activity.onCreateView(Activity.java:5282)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
at android.app.Activity.setContentView(Activity.java:2144)
at com.example.android.MainActivity.onCreate(MainActivity.java:132)