I uploaded a new app bundle to Google Play for testing and I checked the pre-launch report this morning which is complaining that I'm using greylisted private APIs which I'm not supposed to use... but the APIs are being used by the v7 AppCompat library, not me.
So, what the heck am I supposed to do about this?
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V
at android.os.StrictMode.lambda$static$1(StrictMode.java:428)
at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
at java.lang.Class.getDeclaredMethodInternal(Native Method)
at java.lang.Class.getPublicMethodRecursive(Class.java:2075)
at java.lang.Class.getMethod(Class.java:2063)
at java.lang.Class.getMethod(Class.java:1690)
at android.support.v7.widget.ViewUtils.makeOptionalFitsSystemWindows(ViewUtils.java:84)
at android.support.v7.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:685)
at android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:518)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:466)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.inadaydevelopment.wordventure.NavControllerActivity_.setContentView(NavControllerActivity_.java:55)
at com.inadaydevelopment.wordventure.NavControllerActivity.onCreate(NavControllerActivity.java:59)
at com.inadaydevelopment.wordventure.NavControllerActivity_.onCreate(NavControllerActivity_.java:39)
at android.app.Activity.performCreate(Activity.java:7144)
at android.app.Activity.performCreate(Activity.java:7135)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:184)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I'm using Android Annotations, so my code isn't calling setContentView() directly, but this is what the generated code is doing... it's just setting the content view with a resource layout id:
@Override
public void setContentView(int layoutResID) {
super.setContentView(layoutResID);
onViewChangedNotifier_.notifyViewChanged(this);
}
This is a known issue in AppCompat:
What is left right now:
- ViewUtils - View.computeFitSystemWindows and View.makeOptionalFitsSystemWindows
- AppCompatTextViewAutoSizeHelper - TextView.getLayoutAlignment
- SearchView - AutoCompleteTextView.ensureImeVisible
- DropDownListView - AbsListView.mIsChildViewEnabled (field)
Note that as per the 28.0.0 release notes, there's not going to be anymore Support Library releases so you'll need to migrate to AndroidX to get any bug fixes such as this one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With