Robolectric - How to clean up message: "WARNING: unknown service autofill"

Viewed 533

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?

enter image description here

Thanks in advance.

3 Answers

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.

Related