You're using AndroidX dependencies (such as your androidx.appcompat dependency), so you need to use the AndroidX FileProvider, which has a package name of androidx.core.content.FileProvider:

<provider
    android:name="androidx.core.content.FileProvider"
    android:authorities="${applicationId}.provider"
    android:exported="false"
    android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/provider_paths" />
</provider>

连接 https://stackoverflow.com/questions/54914229/unresolved-class-fileprovider
posted on 2021-03-04 17:38  zzx_bky  阅读(152)  评论(0编辑  收藏  举报