Didn't find class “androidx.core.content.FileProvider”

前端 未结 4 1612
天涯浪人
天涯浪人 2021-02-19 09:54

I migrated my app to AndroidX and it\'s crashing on launch on API level 21. My application throws this exception:

10-08          


        
4条回答
  •  北海茫月
    2021-02-19 10:46

    add below ndk lib support to your project if you have used the external library -

    ndk
         {
            abiFilters "armeabi-v7a", "x86", "x86_64", "arm64-v8a"
         }
    

    inside the default config of your app level build.gradle file

    defaultConfig 
        {
            applicationId "org.comcast.net"
            minSdkVersion 21
            targetSdkVersion 28
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
            ndk
                    {
                        abiFilters "armeabi-v7a", "x86", "x86_64", "arm64-v8a"
                    }
        }
    

    it has solved my problem, hopefully it will solve at your end also.

提交回复
热议问题