Sunday, March 17, 2019

When Robolectric tests crash with "window creation failed"

Some students found that Robolectric tests on their Android project crashed with "window creation failed." This seems to be caused by trying to use findViewById before the view tree is ready. Most likely that's going on in an initializer on the same line as an instance variable declaration in an activity class.

No comments:

Post a Comment