问题
I made a migration to AndroidX
, then I'm getting an error if I try to run the project into an emulator with API 29
.
There is no problem in emulators/real devices with API 28
and previous.
java.lang.RuntimeException: Unable to start activity ComponentInfo{ [...]}: android.view.InflateException: Binary XML file line #23 in [...]:layout/abc_screen_simple_overlay_action_mode: Binary XML file line #23 in [...]:layout/abc_screen_simple_overlay_action_mode: Error inflating class androidx.appcompat.widget.FitWindowsFrameLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
回答1:
If you are using Calligraphy Library, make sure to update to the 3+ version as mentioned by the author here: Issue #475
dependencies {
implementation 'io.github.inflationx:calligraphy3:3.1.1'
implementation 'io.github.inflationx:viewpump:2.0.3'
}
来源:https://stackoverflow.com/questions/57627223/error-inflating-class-androidx-appcompat-widget-fitwindowsframelayout-after-migr