Android M has changed the setters for StaticLayout and instead we have the Builder pattern. But with the following code:
StaticLayout staticLayout = StaticLayout.Builder.obtain("Hello", 0, "Hello".length(), getTextPaint(), 100).build();
I get the following exception:
Process: sharpdevs.com.legalapp, PID: 7695 java.lang.NoClassDefFoundError: Failed resolution of: Landroid/text/StaticLayout$Builder;
I've tried everything, could this be an Android bug or am I missing a support library dependency?