问题:android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/包名/cache/pickImageResult.jpeg exposed beyond app through ClipData.Item.getUri()。
error code:
solve:
Create an xml folder in res, and create file_paths.xml in the folder, as shown in the figure:
Custom name and path:
Add the file provider in AndroidManifest.xml, as shown in the figure:
Use in code: