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