Android 10上的应用程序崩溃(布局/abc#u屏幕#u简单线#17中的充气异常)

Android 10上的应用程序崩溃(布局/abc#u屏幕#u简单线#17中的充气异常),android,android-studio,android-layout,androidx,android-10.0,Android,Android Studio,Android Layout,Androidx,Android 10.0,好的,首先,我尝试了这里的所有其他答案(一些例子),甚至到了谷歌搜索的第5页 问题 当我设置targetSdkVersion时,我的应用程序运行得非常好,所以多亏了我,我能够通过删除 implementation 'com.asha.nightowllib:nightowllib:0.2' 由于某种原因,这个库就是应用程序在Android 10设备上崩溃的原因 Caused by: java.lang.NullPointerException: Attempt to invoke virtua

好的,首先,我尝试了这里的所有其他答案(一些例子),甚至到了谷歌搜索的第5页

问题

当我设置
targetSdkVersion时,我的应用程序运行得非常好,所以多亏了我,我能够通过删除

implementation 'com.asha.nightowllib:nightowllib:0.2'
由于某种原因,这个库就是应用程序在Android 10设备上崩溃的原因

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Field.get(java.lang.Object)' on a null object reference
    at com.asha.nightowllib.inflater.InjectedInflaterBase.getConstructorArgs(InjectedInflaterBase.java:81)
        at com.asha.nightowllib.inflater.LastChance2Inflater.lastChance2CreateView(LastChance2Inflater.java:22)
        at com.asha.nightowllib.inflater.InjectedInflaterV11$PrivateFactoryWrapperImpl.onCreateView(InjectedInflaterV11.java:189)

对于将来可能发生类似崩溃的任何人,请查看堆栈跟踪以查找对您添加的库的任何引用,这可能是罪魁祸首。

“我的文件中没有任何abc\u屏幕\u简单布局”-这是AppCompat的一部分。在上面显示的最后一行之后,应该有更多的堆栈跟踪。例如,显示了相同的崩溃,但更多的是堆栈跟踪,指出了第三方库(ViewPump)中的一个问题。@Commonware感谢您指出这一点,我已经更新了日志。您可以尝试从抽屉布局中删除android:FitsystemWindows=“true”吗?听起来像是在做一些讨厌的事情,您应该删除它
plugins {
    id 'com.android.application'
    id 'com.google.gms.google-services'
    id 'com.google.firebase.crashlytics'
}

android {
    compileSdkVersion 30
    buildToolsVersion "28.0.3"

    defaultConfig {
        applicationId "com.example.app"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0-rc01'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.navigation:navigation-fragment:2.3.2'
    implementation 'androidx.navigation:navigation-ui:2.3.2'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
    testImplementation 'junit:junit:4.13.1'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation 'com.squareup.retrofit2:retrofit:2.6.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
    implementation 'androidx.annotation:annotation:1.1.0'
    implementation 'com.facebook.android:audience-network-sdk:6.2.0'
    implementation 'com.asha.nightowllib:nightowllib:0.2'
    implementation 'com.facebook.shimmer:shimmer:0.5.0'

    //Firebase
    implementation platform('com.google.firebase:firebase-bom:26.2.0')
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.google.firebase:firebase-messaging'
    implementation 'com.google.firebase:firebase-inappmessaging-display'
    implementation 'com.google.firebase:firebase-crashlytics'

}
implementation 'com.asha.nightowllib:nightowllib:0.2'
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Field.get(java.lang.Object)' on a null object reference
    at com.asha.nightowllib.inflater.InjectedInflaterBase.getConstructorArgs(InjectedInflaterBase.java:81)
        at com.asha.nightowllib.inflater.LastChance2Inflater.lastChance2CreateView(LastChance2Inflater.java:22)
        at com.asha.nightowllib.inflater.InjectedInflaterV11$PrivateFactoryWrapperImpl.onCreateView(InjectedInflaterV11.java:189)