解决AndroidStudio编译报错:Didn't find class "android.support.v4.content.FileProvider" on path:

在使用FileProvider时报错:

Caused by: java.lang.ClassNotFoundException: Didn’t find class
“android.support.v4.content.FileProvider” on path:
在这里插入图片描述
只需要将:

android.support.v4.content.FileProvider

改为:

androidx.core.content.FileProvider

如果是在AndroidManifest.xml
同理将:

android:name=“android.support.v4.content.FileProvider”

改为:

android:name="androidx.core.content.FileProvider"
发布了54 篇原创文章 · 获赞 1 · 访问量 6457

猜你喜欢

转载自blog.csdn.net/qq_39827677/article/details/104677336