我正在尝试为 android 应用程序编写 robolectric 测试。当我尝试读取 cofig 时,出现以下错误。
Caused by: java.lang.IllegalArgumentException: Got resource name bool/config_enable from id 2131427329 (0x7f0b0001), but found no resource by that name
at com.xtremelabs.robolectric.res.BoolResourceLoader.getValue(BoolResourceLoader.java:27)
at com.xtremelabs.robolectric.res.ResourceLoader.getBooleanValue(ResourceLoader.java:462)
at com.xtremelabs.robolectric.shadows.ShadowResources.getBoolean(ShadowResources.java:193)
at android.content.res.Resources.getBoolean(Resources.java)