Open icegood opened 5 days ago
in my tests: @RunWith(RobolectricTestRunner.class) @Config(sdk = 30)
while https://developer.android.com/reference/android/graphics/text/TextRunShaper is from API 31.
Why API 31 is brought up?
@icegood What about trying 4.13? It fixed some compatibility issues like TextRunShaper that you used. https://github.com/robolectric/robolectric/pull/9033.
I tested it with https://github.com/robolectric/robolectric/pull/9687, and your sample code works without any error in sdkcompat integration test module. So I think it can work with Robolectric 4.13.
Description
error: cannot access TextRunShaper ShadowApplication app = Shadows.shadowOf(mTestContext); ^ class file for android.graphics.text.TextRunShaper not found 1 error
FAILURE: Build failed with an exception.
Steps to Reproduce
Call:
mTestContext = RuntimeEnvironment.getApplication(); ShadowApplication app = Shadows.shadowOf(mTestContext);
Robolectric & Android Version
testImplementation 'org.robolectric:robolectric:4.12'
Link to a public git repo demonstrating the problem:
none