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