Bug 61026 - Getting "No resource found that matches the given name" at a resource placed in resources/xml
Summary: Getting "No resource found that matches the given name" at a resource placed ...
Status: RESOLVED ANSWERED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 8.1 (15.5)
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-12-07 17:29 UTC by Wagner Teixeira
Modified: 2017-12-08 18:14 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
A sample project that show the build error message (358.69 KB, application/zip)
2017-12-07 17:29 UTC, Wagner Teixeira
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Wagner Teixeira 2017-12-07 17:29:02 UTC
Created attachment 25937 [details]
A sample project that show the build error message

obj/Debug/android/manifest/AndroidManifest.xml: Error APT0000: 11: error: Error: No resource found that matches the given name (at 'resource' with value '@xml/file_paths'). (APT0000) (TestFileProvider.Droid)


I tried to implement a FileProvider as in https://developer.android.com/reference/android/support/v4/content/FileProvider.html#ProviderDefinition where you define a Provider on AndroidManifest that specifies paths for file sharing. This paths are defined as a xml resource in a xml resource folder and pointed as '@xml/file_paths.xml'. 

Xamarin build generates a Resource.Xml.file_paths but it cannot be called on AndroidManifest.

I created a empty project in Visual Studio for Mac that defines only a FileProvider and this error still persists. Project attached.
Comment 1 Jon Douglas [MSFT] 2017-12-08 18:14:18 UTC
You have a typo.

It should be "@xml/files_path" and not "@xml/file_paths".