在Android 10中夸大类androidx.appcompat.widget.FitWindowsLinearLayout时出错

问题描述

我打开了一个旧的Android项目,并修复了大多数错误,现在只有一个仅出现在Android 10设备上的错误:

java.lang.RuntimeException: Unable to start activity ComponentInfo{}: android.view.InflateException: Binary XML file line #17 in :layout/abc_screen_simple: Binary XML file line #17 in :layout/abc_screen_simple: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout

我发现了一些有关升级书法和Viewpump的技巧,但是这些依赖项未包含在我的项目中,添加它们也不能解决问题。 这是我的依赖项:

    implementation 'androidx.appcompat:appcompat:1.3.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'com.google.android.material:material:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'com.google.firebase:firebase-core:17.4.4'
implementation 'com.google.firebase:firebase-messaging:20.2.4'
implementation 'androidx.multidex:multidex:2.0.1'
implementation('com.squareup.retrofit2:converter-simplexml:2.9.0') {
    exclude module: 'stax-api'
}
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-places:17.0.0'
implementation('org.simpleframework:simple-xml:2.7.1') {
    exclude module: 'stax-api'
}
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'com.bpodgursky:jbool_expressions:1.14'
implementation 'com.jakewharton:butterknife:10.2.2'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.2'
implementation 'com.opencsv:opencsv:4.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.github.aakira:expandable-layout:1.4.2@aar+'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.github.bmarrdev:android-DecoView-charting:v1.2'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation('com.foursquare:foursquare-android-oauth:1.0.3') {
    exclude group: 'com.google.android'
}
implementation group: 'com.squareup.okhttp3',name: 'logging-interceptor',version: '4.8.1'
implementation group: 'com.github.ganfra',name: 'material-spinner',version: '2.0.0'

implementation 'com.evernote:android-job:1.2.4'
implementation 'com.github.bmarrdev:android-DecoView-charting:v1.2'
implementation 'com.xw.repo:bubbleseekbar:3.15-lite'
implementation 'pl.edu.wat.wcy.iqpharma:shared:1.62'
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
implementation group: 'com.github.ozodrukh',name: 'CircularReveal',version: '2.0.1'

implementation group: 'com.mikepenz',name: 'iconics-core',version: '3.2.1'
implementation group: 'com.mikepenz',name: 'material-design-iconic-typeface',version: '2.2.0.5'
implementation group: 'com.mikepenz',name: 'fontawesome-typeface',version: '5.3.1.1'

implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'com.andrognito.pinlockview:pinlockview:2.1.0'
implementation 'io.github.inflationx:calligraphy3:3.1.1'
implementation 'io.github.inflationx:viewpump:2.0.3'

解决方法

我找到了问题的答案。我使用的字体很棒(com.mikepenz),这就是为什么它不起作用的原因:

IconicsContextWrapper.wrap(newBase)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...