迁移到androidx后,膨胀androidx.appcompat.widget.FitWindowsFrameLayout类时出错 [英] Error inflating class androidx.appcompat.widget.FitWindowsFrameLayout after migration to androidx
本文介绍了迁移到androidx后,膨胀androidx.appcompat.widget.FitWindowsFrameLayout类时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我迁移到了 AndroidX
,如果尝试使用 API 29
将其运行到模拟器中,则会收到一个错误消息.
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
.
使用 API 28
及更高版本的仿真器/真实设备中没有问题.
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)
推荐答案
如果您使用的是书法库,请确保更新为作者在此处提到的3+版本:
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'
}
这篇关于迁移到androidx后,膨胀androidx.appcompat.widget.FitWindowsFrameLayout类时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文