During my tests with Robolectric, I always get a warning message in console (no LogCat) with says: "WARNING: unknown service autofill".
Does Anyone know what to do to clean it up?
Thanks in advance.
During my tests with Robolectric, I always get a warning message in console (no LogCat) with says: "WARNING: unknown service autofill".
Does Anyone know what to do to clean it up?
Thanks in advance.
You can set the sdk version to 25. Thereby the tests will run against api level 25. The warnings should be removed/implemented in future robolectric versions.
To set the sdk version see: http://robolectric.org/configuring/
The following configurations worked for me,
@Config(sdk = 21)
public class MyClassTests {
/* testCodeHere */
}
Other sdk Config that worked fine =
@Config(sdk = 22)@Config(sdk = 23)@Config(sdk = 24)@Config(sdk = 25)This error happens when running tests against sdk = 26.
Therefore, as @Moritz suggested,
change the sdkVersion in your tests or create a robolectric.properties file, Configuring Robolectric.
I upgraded from SDK 24 to 26 and began seeing this error. Going back to SDK 25 didn't seem like a good solution so I tried upgrading Robolectric to its latest stable version.
At time of writing this is version 3.8. https://mvnrepository.com/artifact/org.robolectric/robolectric/3.8
This fixed the problem for me.
From the sounds of it, they fixed this in 3.7 https://github.com/robolectric/robolectric/releases/