Android: FileProvider issue

Hi there,

I’m trying to setup a [FileProvider][1] to allow my app to get files from Photos and the Camera on Android. To do this I’ve added the following XML with the res directory:

<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
	<cache-path name="my_images" path="images/"/>
</paths>

I’ve tried node types of cache-path, files-path and external-path but all throw errors on packaging:

Y:\app\src\main\res\matchoofiles\imagefileprovider.xml: Error: Unsupported type 'cache-path'

Any ideas what the solution is here? The only thing I’ve found online suggests needing a newer tool set but I’m in unfamiliar territory here.

[1]:

Looks like the problem might be that I wasn’t putting the .xml file in an xml directory. Now I’m naming it the same as in the examples (res/xml/file_paths.xml) the error seems to have gone away.

That did fix the initial problem - sadly I’m having a second issue where the file only seems to register with the Android system on a completely fresh build. On subsequent builds my app crashes on launch. Will open a new bug for the new issue.