小编Kan*_*shk的帖子

关于使用AndroidJunitRunner和AndroidJUnit4的Android Instrumentation测试java.lang.UnsatisfiedLinkError

我在单元测试中使用robolectric.最近在我们的项目中,我们正在添加zendesk的新依赖项.

repositories {

    maven {
        url 'https://zendesk.artifactoryonline.com/zendesk/repo'
    }
}

compile group: 'com.zendesk', name: 'sdk', version: '1.3.0.1'
Run Code Online (Sandbox Code Playgroud)

现在我们甚至都没有引用这个库中的任何类,我们只是通过添加这个依赖项来获取robolectric单元测试中的异常.我认为问题出在我们的项目中,但它也发生在样本robolectric测试项目上.

java.lang.VerifyError: Expecting a stackmap frame at branch target 31
Exception Details:
  Location:
    com/zendesk/sdk/power/BatteryStateBroadcastReceiver.onReceive(Landroid/content/Context;Landroid/content/Intent;)
V @13: ifnonnull
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0x0000000: b200 1212 0703 bd00 0fb8 0015 2cc7 0012
    0x0000010: b200 1212 0303 bd00 0fb8 0017 a700 66b2
    0x0000020: 0012 bb00 1159 b700 1c12 04b6 001d 2cb6
    0x0000030: 0014 b600 1db6 001e 03bd 000f b800 1512
    0x0000040: 062c b600 …
Run Code Online (Sandbox Code Playgroud)

java junit android unit-testing robolectric

5
推荐指数
1
解决办法
1042
查看次数

标签 统计

android ×1

java ×1

junit ×1

robolectric ×1

unit-testing ×1