我尝试将测试中的robolectric版本升级到3.3.2。但它只是给了我这个错误
cannot access VectorDrawable ShadowActivity shadowActivity = org.robolectric.Shadows.shadowOf(testContext);
class file for android.graphics.drawable.VectorDrawable not found
这是我的测试代码
Activity testContext;
testContext = Robolectric.buildActivity(Activity.class).get();
ShadowActivity shadowActivity = org.robolectric.Shadows.shadowOf(testContext);
的build.gradle
testCompile libs['powermock-api-mockito-2']
testCompile libs['powermock-module-junit4-2']
testCompile(group: 'org.robolectric', name: 'robolectric', version:'3.3.2')
testCompile(group: 'org.robolectric', name: 'shadows-support-v4', version:'3.1.2')
testCompile(group: 'org.robolectric', name: 'shadows-core-v23', version:'3.1.2')
testCompile(group: 'org.robolectric', name: 'shadows-multidex', version:'3.1.2')
你可以告诉我我做错了什么吗?这个错误没有意义,因为我没有在我的测试代码中绘图或任何东西。那为什么它给了我VectorDrawable的错误?
感谢Adavance