Restrictions on non-SDK interfaces with androidx.appcompat library

139
May 05, 2021, at 08:20 AM

Due to Restrictions on non-SDK interfaces on app targeting Android 11, I have used vertex tool provided by Android Developers site to find list of non-SDK API in my app.

Here is part of list:

#15: Reflection max-target-p Landroid/animation/LayoutTransition;->cancel use(s):
       Landroidx/transition/ViewGroupUtilsApi14;->cancelLayoutTransition(Landroid/animation/LayoutTransition;)V

#67: Reflection max-target-p Landroid/view/View;->mViewFlags use(s):
       Landroidx/transition/ViewUtilsBase;->setTransitionVisibility(Landroid/view/View;I)V
#68: Reflection max-target-p Landroid/view/View;->setFrame use(s):
       Landroidx/transition/ViewUtilsBase;->fetchSetFrame()V

#72: Reflection max-target-p Landroid/view/inputmethod/InputMethodManager;->mH use(s):
       Landroidx/activity/ImmLeaksCleaner;->initializeReflectiveFields()V             

#75: Reflection max-target-p Landroid/widget/AutoCompleteTextView;->doAfterTextChanged use(s):
       Landroidx/appcompat/widget/SearchView$PreQAutoCompleteTextViewReflector;-><init>()V
#76: Reflection max-target-p Landroid/widget/AutoCompleteTextView;->doBeforeTextChanged use(s):
       Landroidx/appcompat/widget/SearchView$PreQAutoCompleteTextViewReflector;-><init>()V
#77: Reflection max-target-p Landroid/widget/AutoCompleteTextView;->ensureImeVisible use(s):
       Landroidx/appcompat/widget/SearchView$PreQAutoCompleteTextViewReflector;-><init>()V
#78: Reflection max-target-p Landroid/widget/ImageView;->mDrawMatrix use(s):
       Landroidx/transition/ImageViewUtils;->fetchDrawMatrixField()V
#79: Reflection max-target-p Landroid/widget/TextView;->getHorizontallyScrolling use(s):
       Landroidx/appcompat/widget/AppCompatTextViewAutoSizeHelper$Impl;->isHorizontallyScrollable(Landroid/widget/TextView;)Z

#86: Reflection max-target-o Lcom/android/internal/view/menu/MenuBuilder;->removeItemAt use(s):
       Landroidx/core/widget/TextViewCompat$OreoCallback;->recomputeProcessTextMenuItems(Landroid/view/Menu;)V

These APIs are tagging with max-target-p or max-target-o, and coming from Android libraries.

As I want my app to target Android R, I have to handle these APIs.

Here is list of dependency that are related to androidx which is used in my app:

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.2.0'

Is there any solution to fix or bypass those androidx api restriction?

Rent Charter Buses Company
READ ALSO
TypeError: event.preventDefault is not a function

TypeError: event.preventDefault is not a function

I am following a tutorial and copied everything but got this error "TypeError: eventpreventDefault is not a function" in the onSubmit() but the event

256
Which CSS properties affect the accesibility tree?

Which CSS properties affect the accesibility tree?

By the sacred separation of contents and presentation, I assumed that CSS was ignored by screen readersThis naive assumption is false

108
ReferenceError: require is not defined on github action

ReferenceError: require is not defined on github action

I run the npm run build on github action but it shows the error of ReferenceError: require is not defined

188
Need help in Jcrop - Class jcrop-tracker

Need help in Jcrop - Class jcrop-tracker

I have developed a Picture Capture WebApp using a Live Camera and Upload File

110