Commit 60ffd68b authored by Maurice Lam's avatar Maurice Lam
Browse files

Remove from android-all jar from classpath

Let Robolectric's classloader to load android-all of the appropriate
version when the test runs. This allows Robolectric to better catch
inappropriate NewApi usage.

This means that classes cannot call Android SDK methods in static
initializers. Those calls should instead be moved to @BeforeClass.
If you get "Stub!" exception, try moving the call into the test
initializers @Before or @BeforeClasss instead.

For bundled apps which can use hidden APIs, in order to resolve
NoClassDefFoundError when using hidden classes as fields, you should
add platform-robolectric-android-all-stubs to
LOCAL_STATIC_JAVA_LIBRARIES in your makefile.

Test: m RunSuwRoboTests RunSettingsRoboTests
Bug: 35196049
Change-Id: I7a135e43aafee0f49527abfe666e5e992f80c41a
parent b4c3ed6a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment