Unable to get provider android.support.v4.content.FileProvider

react-native-image-crop-picker
react-native-image-crop-picker 集成到android,出现app打开就闪退的问题,Android Studio调试报错如下

Unable to get provider android.support.v4.content.FileProvider

解决方法:

第一步:

node_modules/react-native-image-crop-picker/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java中的import android.support.v4.content.FileProvider;替换为import androidx.core.content.FileProvider;

第一步:

node_modules/react-native-image-crop-picker/android/src/main/AndroidManifest.xml中的android:name="android.support.v4.content.FileProvider"修改为android:name="androidx.core.content.FileProvider"

参考:https://github.com/ivpusic/react-native-image-crop-picker/issues/1071

有需要开发项目的可以联系我

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。