robolectric运行一直提示getSystemService找不到
java.lang.NoSuchMethodError: com.android.calendar.CalendarApplication.getSystemService(Ljava/lang/Class;)Ljava/lang/Object;at com.android.calendar.CalendarApplication.onCreate(CalendarApplication.java:48)
at org.robolectric.android.internal.AndroidTestEnvironment.lambda$installAndCreateApplication$0(AndroidTestEnvironment.java:276)
at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:75)
at org.robolectric.android.internal.AndroidTestEnvironment.installAndCreateApplication(AndroidTestEnvironment.java:276)
at org.robolectric.android.internal.AndroidTestEnvironment.setUpApplicationState(AndroidTestEnvironment.java:169)
at org.robolectric.RobolectricTestRunner.beforeTest(RobolectricTestRunner.java:301)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:243)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
有没有碰到类似情况的?
https://blog.csdn.net/qq_35246620/article/details/54412648 可以参考看下。 重装下? https://blog.csdn.net/qq_35246620/article/details/54412648 参考下这篇文章 :victory: 是不是缺少文件之类的
页:
[1]