我迁移到AndroidX
,如果尝试使用API 29
将项目运行到仿真器中,则会收到错误消息。
使用API 28
及更高版本的仿真器/真实设备中没有问题。
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)
答案 0 :(得分:3)
如果您使用的是书法库,请确保更新为作者在此处提到的3+版本:Issue #475
dependencies {
implementation 'io.github.inflationx:calligraphy3:3.1.1'
implementation 'io.github.inflationx:viewpump:2.0.3'
}