0
compileSdkVersion 29
defaultConfig {
    ...
    targetSdkVersion 29
    ...
}

According to the Play Console, the new app will change to SDK 29 from August and cannot be uploaded unless updated from November. The app ended abnormally after changing the target SDK to 29. The log is:

W/abc.def: Accessing hidden field Landroid/view/LayoutInflater;->mConstructorArgs: [Ljava/lang/Object; (greylist-max-p, reflection, denied)

D/AndroidRuntime: Shutting down VM

E/AndroidRuntime: FATAL EXCEPTION: main Process: net.abc.def, PID: 28318 java.lang.RuntimeException: Unable to start activity ComponentInfo{net.abc.def/net.abc.def.ui.SplashActivity}: android.view.InflateException: Binary XML file line #17 in net.abc.def:layout/abc_screen_simple: Binary XML file line #17 in net.abc.def:layout/abc_screen_simple: Error inflating class android.support.v7.widget.FitWindowsLinearLayout

I guess this is because I am using a non-SDK interface. Because Google explains as follows

Landroid/view/LayoutInflater;->mConstructorArgs:[Ljava/lang/Object;   

#No public alternative. Developers should never access this field directly.

Is the abnormal termination due to a non-sdk interface? So how do you solve it? Many LayoutInflaters are used in the my code.

james
  • 1

1 Answers1

0

If you were not touching mConstructorArgs in your source-code then try searching if any of your libraries was accessing that field.

In my case the culprit was the old version of Calligraphy library. enter image description here

Crash on calligraphy library by chris Jenx for Android Q

UenX
  • 162
  • 10