Skip to content

Instantly share code, notes, and snippets.

@Defuera
Last active May 18, 2017 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Defuera/94f547ecf076231e5fe0f1cdaacb0f1b to your computer and use it in GitHub Desktop.
Save Defuera/94f547ecf076231e5fe0f1cdaacb0f1b to your computer and use it in GitHub Desktop.
crash at Robolectric.buildActivity(SitterChatsListActivity.class).create().start()
@RunWith(RobolectricTestRunner.class)
@Config(constants = BuildConfig.class, sdk = M, manifest = "src/main/AndroidManifest.xml")
public class ChatsListActivityTest extends RobolectricTestCase {
ActivityController controller;
private ChatsListView view;
@Before
public void setUp() throws Exception {
controller = Robolectric.buildActivity(SitterChatsListActivity.class)
.create()
.start();
view = (ChatsListView) controller.get();
controller.resume();
controller.visible();
}
@Test
public void testSomething() {
assertNotNull(view.getPresenter());
}
@After
public void tearDown() throws Exception {
}
}
No such manifest file: build/intermediates/bundles/stage/debug/src/main/AndroidManifest.xml
android.content.res.Resources$NotFoundException: Resource ID #0x7f020052
at android.content.res.Resources.getValue(Resources.java:1013)
at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:332)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:197)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:190)
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:711)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81)
at android.support.v7.app.AppCompatDelegateImplBase.__constructor__(AppCompatDelegateImplBase.java:131)
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:205)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:519)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
at io.reist.visum.view.VisumActivity.onCreate(VisumActivity.java:106)
at ru.kidsout.common.app.view.BaseActivity.onCreate(BaseActivity.java:33)
at ru.kidsout.common.app.view.ToolbarActivity.onCreate(ToolbarActivity.java:31)
at ru.kidsout.common.chat.view.ChatsListActivity.onCreate(ChatsListActivity.java:39)
at android.app.Activity.performCreate(Activity.java:5008)
at org.robolectric.util.ReflectionHelpers.callInstanceMethod(ReflectionHelpers.java:231)
at org.robolectric.android.controller.ActivityController$1.run(ActivityController.java:140)
at org.robolectric.shadows.ShadowLooper.runPaused(ShadowLooper.java:362)
at org.robolectric.shadows.CoreShadowsAdapter$2.runPaused(CoreShadowsAdapter.java:40)
at org.robolectric.android.controller.ActivityController.create(ActivityController.java:137)
at org.robolectric.android.controller.ActivityController.create(ActivityController.java:147)
at org.robolectric.android.controller.ActivityController.setup(ActivityController.java:245)
at org.robolectric.Robolectric.setupActivity(Robolectric.java:97)
at ru.kidsout.parent.chat.view.ChatsListActivityTest.setUp(ChatsListActivityTest.java:33)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.robolectric.internal.SandboxTestRunner$2.evaluate(SandboxTestRunner.java:209)
at org.robolectric.internal.SandboxTestRunner.runChild(SandboxTestRunner.java:109)
at org.robolectric.internal.SandboxTestRunner.runChild(SandboxTestRunner.java:36)
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:63)
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:117)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment