本文共 1178 字,大约阅读时间需要 3 分钟。
异常类型
使用 Robolectric 单元测试运行时 bugly 初始化异常
手机型号
直接在 JVM 上运行的,没在手机运行
手机系统版本
同上
Tinker版本
没用 Tinker,gradle 依赖:
compile 'com.tencent.bugly:nativecrashreport:latest.release'
compile 'com.tencent.bugly:crashreport_upgrade:latest.release'
gradle版本
2.3.0
系统
Windows
堆栈/日志
java.lang.VerifyError: Expecting a stackmap frame at branch target 74
Exception Details:
Location:
com/tencent/bugly/a.onDbDowngrade(Landroid/database/sqlite/SQLiteDatabase;II)V @0: aload_0
Reason:
Expected stackmap frame at this location.
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: 2ab6 0009 c700 04b1 2ab6 0009 3a04 1904
Exception Handler Table:
bci [0, 7] => handler: 74
bci [8, 71] => handler: 74
at com.lerdong.dm78.base.BaseApplication.initBugly(BaseApplication.java:88)
at com.lerdong.dm78.base.BaseApplication.onCreate(BaseApplication.java:61)
复现路径
@RunWith(MyRobolectricTestRunner.class)
@config(constants = BuildConfig.class, sdk = 21,buildDir = "app/build")
public class AssembleDetailPresenterTest extends BaseTest {
@test
public void getListData() throws Exception {
}
}
public class BaseApplication extends MobApplication {
@override
public void onCreate() {
initBugly();
}
}
转载地址:http://biima.baihongyu.com/