Unable to get provider android.s

2020-11-13  本文已影响0人  十里柔情

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

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

上一篇下一篇

猜你喜欢

热点阅读