java.lang.NullPointerException
at com.squareup.leakcanary.internal.LeakCanaryInternals.isInServiceProcess(LeakCanaryInternals.java:114)
at com.squareup.leakcanary.LeakCanary.isInAnalyzerProcess(LeakCanary.java:182)
at json.chao.com.wanandroid.app.WanAndroidApp.onCreate(WanAndroidApp.java:94)
at org.robolectric.android.internal.ParallelUniverse.lambda$setUpApplicationState$0(ParallelUniverse.java:208)
at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:72)
at org.robolectric.android.internal.ParallelUniverse.setUpApplicationState(ParallelUniverse.java:207)
at org.robolectric.RobolectricTestRunner.beforeTest(RobolectricTestRunner.java:335)
at org.robolectric.internal.SandboxTestRunner$2.evaluate(SandboxTestRunner.java:245)
at org.robolectric.internal.SandboxTestRunner.runChild(SandboxTestRunner.java:130)
at org.robolectric.internal.SandboxTestRunner.runChild(SandboxTestRunner.java:42)
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.internal.SandboxTestRunner$1.evaluate(SandboxTestRunner.java:84)
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:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
单元测试的代码都报同一个错误, LeakCanary内部空指针?
java.lang.NullPointerException at com.squareup.leakcanary.internal.LeakCanaryInternals.isInServiceProcess(LeakCanaryInternals.java:114) at com.squareup.leakcanary.LeakCanary.isInAnalyzerProcess(LeakCanary.java:182) at json.chao.com.wanandroid.app.WanAndroidApp.onCreate(WanAndroidApp.java:94) at org.robolectric.android.internal.ParallelUniverse.lambda$setUpApplicationState$0(ParallelUniverse.java:208) at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:72) at org.robolectric.android.internal.ParallelUniverse.setUpApplicationState(ParallelUniverse.java:207) at org.robolectric.RobolectricTestRunner.beforeTest(RobolectricTestRunner.java:335) at org.robolectric.internal.SandboxTestRunner$2.evaluate(SandboxTestRunner.java:245) at org.robolectric.internal.SandboxTestRunner.runChild(SandboxTestRunner.java:130) at org.robolectric.internal.SandboxTestRunner.runChild(SandboxTestRunner.java:42) 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.internal.SandboxTestRunner$1.evaluate(SandboxTestRunner.java:84) 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:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)