New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalStateException when inflating layout with support library 24 #2578
Comments
That test on your master and support-library-24.1 branch does not work for me. I suggest using CI such as TravisCI so people can see that your build is passing or not.
Here are my errors:
|
Sorry, I should have said they work only on productionDebug build variant. I didn't bothered with mocking some of the dependencies used for testing in devtoolsDebug, but I don't get paid for my hobby project anyway. |
This should be fixed with Robolectric 4.0 and binary resources. Please reopen if its still an issue |
I've encountered this issue with AndroidX and Robolectric 4.3, at this line: Error:
|
@skarempudi try switching to LooperMode(PAUSED) and ActivityScenario |
Ah yes, sorry, I hadn't tried that because this test was passing on our AndroidX migration branch before it was merged into our master branch, where it started failing. Doing that is making the test pass. Thanks. |
Description
Since updating support library from 23.4 to 24.1 (on 24.0 I had similar issue) some of my previously working tests fail when activity starts. It happens during RecyclerView item inflation. I cannot pinpoint exactly what causes it, I have similar layout hierarchy in 3 activities: IngredientsActivity, TagsActivity and OverviewActivity: DrawerLayout -> CoordinatorLayout -> FrameLayout -> RecyclerView. Views that are inflated are similar with root view HorizontalScrollView. In 2 out 3 activities: OverviewActivity and IngredientsActivity inflation fails.
Stacktrace when Robolectric config sdk = 22
Stacktrace when config sdk = 23
Steps to Reproduce
Not sure since I don't know root problem.
You can try running this test on branch support-library-24.1
Robolectric & Android Version
Robolectric version: 3.1.1
Support library version 24.1
Config: sdk = 23 and 22
compileSdkVersion = 24
buildToolsVersion = '24.0.1'
The text was updated successfully, but these errors were encountered: