Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Since the last VS update (15.4.1) whenever I go to debug my Android app, I receive build errors for all of my resources; complaining of missing resources. For example:
error: Error: No resource found that matches the given name (at 'contentDescription' with value '@string/AppBar_Button_ShowAbout')
I've tried turning of fast app deployment (which was of anyway since that hasn't worked for a while.
The workaround is to rebuild my app every time I wish to debug.
Visual Studio 15.4.1
(In reply to Daniel Vaughan from comment #0)
> Since the last VS update (15.4.1) whenever I go to debug my Android app, I
> receive build errors for all of my resources; complaining of missing
> resources. For example:
> error: Error: No resource found that matches the given name (at
> 'contentDescription' with value '@string/AppBar_Button_ShowAbout')
> I've tried turning of fast app deployment (which was of anyway since that
> hasn't worked for a while.
> The workaround is to rebuild my app every time I wish to debug.
> Visual Studio 15.4.1
> Xamarin.Android 22.214.171.124
Hi Daniel and thank you for your report. Can you please provide the following items for us to further investigate? You can reference our Bug Writing process for details:
1. Steps to reproduce
2. Actual Results
3. Expected Results
4. Diagnostic Build Output - https://developer.xamarin.com/guides/android/troubleshooting/troubleshooting/#Diagnostic_MSBuild_Output
Same problem here. I think this happens, because the theme I use is located in the styles.xml in a portable project, not in the main application itself.
I also have to rebuild every time the code changes, otherwise it would not compile, because the resource.designer.cs is incomplete and the styles from the portable project are missing.
Sadly, I cannot provide you the steps to reproduce, nor a test project, because most of the times I don't get the error there.
I've sent the MSBuild output to you, Jon, via email.
My projects are set up as follows:
There is a head 'launcher' Android app project (A) and a referenced Android class library project (B).
B has string resources that are referenced in layouts in A. For example, mainview.axml in A may contain
If I make a code change to a class in B, a build error occurs stating that no resource named aStringFromB can be found in project A.
Rebuilding fixes it, but it's hurting productivity.
It happens every time for me for a large project. However, I have not been successful in creating a repro solution.
## Cross-referencing note for the Xamarin team
The following IDE-focused issue report looks like it might also match this symptom:
Thank you for your previous email. I really appreciate you.
I believe this will be fixed in our upcoming 15.5 Preview 3 release based on the following pull request that was recently fixed:
Specifically in the following commit:
To put it short:
This fixes an `aapt` error that occurs because DesignTime builds did not have their own set of cache files. DesignTime builds now have their own set of cache files which do not conflict with the main build's cache files.
If you aren't familiar with design-time builds, you can read up on them here:
Based on the description of https://bugzilla.xamarin.com/show_bug.cgi?id=60343#c3 I believe this commit might fix your current problem. I'm leaving this bug in NEEDINFO until we can get confirmation from you once 15.5 Preview 3 releases. For an ideal date when 15.5 Preview 3 releases, you can guesstimate based on our "Release History"
Thanks for investigating, Jon. I'll let you know on this thread if the update resolves the issue.
(In reply to Daniel Vaughan from comment #6)
> Thanks for investigating, Jon. I'll let you know on this thread if the
> update resolves the issue.
I am marking this issue as RESOLVED FIXED based on my findings in https://bugzilla.xamarin.com/show_bug.cgi?id=60343#c5
If this still occurs locally, please feel free to REOPEN this issue.
For me this problem still occurs in version 15.5.1
It also still occurs for me.
Hi Daniel and Eric,
Can you ensure that your NuGet packages are properly restored? If any of you have a simple project that this is occuring on handy and can upload to this bug report, that would be very helpful. Based on these types of errors they typically stem from 1 thing:
Which in turn can be caused by many things which a Diagnostic Build Output would help us investigate further as well.
Setting to NEEDINFO until we can get further confirmation.
I'm currently blocked by a new issue https://bugzilla.xamarin.com/show_bug.cgi?id=60992
As soon as I receive the 15.5.2 update and it resolves that issue, I'll get back to you on this one.
(In reply to Daniel Vaughan from comment #11)
> Hi Jon,
> I'm currently blocked by a new issue
> As soon as I receive the 15.5.2 update and it resolves that issue, I'll get
> back to you on this one.
Please keep discussion about other issues in their respective bugzilla. This issue pertains to "No resource found that matches the given name". Can you confirm based on my comments in https://bugzilla.xamarin.com/show_bug.cgi?id=60343#c10 ?
Project now builds, Jon. I'm closing the issue. Thanks for your help.
(In reply to Daniel Vaughan from comment #13)
> Project now builds, Jon. I'm closing the issue. Thanks for your help.
Thank you for following up!
(In reply to Daniel Vaughan from comment #13)
> Project now builds, Jon. I'm closing the issue. Thanks for your help.
Hi Daniel, what did you do to fix this issue? I still get this error.
Looks like I was too early closing this issue. I'm seeing it again too. I'm prevented from properly testing this issue because of another issue I'm facing https://bugzilla.xamarin.com/show_bug.cgi?id=61073
I'm going to re-open this issue.
Created attachment 26072 [details]
To reproduce the issue please perform the following steps:
1. Open the XamarinAndroidResourceNotFound.sln in the attached zip file.
2. From within Visual Studio 2017 select Build/Rebuild Solution.
3. From within Visual Studio 2017 select Build/Transform All Templates.
4. Start Debugging (Press F5)
A build error should appear stating that No resource found that matches the given name (at 'text' with value '@string/testString').
The build error doesn't go away until a full Rebuild is performed.
'testString' is a string defined in ClassLibrary1/Resources/values/String.xml
The ClassLibrary1 project is referenced by the XamarinAndroidResourceNotFound project.
The T4 template generates a bunch of randomly named classes.
(In reply to Daniel Vaughan from comment #17)
> Created attachment 26072 [details]
> Repro Solution
> To reproduce the issue please perform the following steps:
> 1. Open the XamarinAndroidResourceNotFound.sln in the attached zip file.
> 2. From within Visual Studio 2017 select Build/Rebuild Solution.
> 3. From within Visual Studio 2017 select Build/Transform All Templates.
> 4. Start Debugging (Press F5)
> A build error should appear stating that No resource found that matches the
> given name (at 'text' with value '@string/testString').
> The build error doesn't go away until a full Rebuild is performed.
> 'testString' is a string defined in ClassLibrary1/Resources/values/String.xml
> The ClassLibrary1 project is referenced by the
> XamarinAndroidResourceNotFound project.
> The T4 template generates a bunch of randomly named classes.
I believe this issue is resolved in 15.6 as part of a regression clean up:
I can reproduce this issue on 15.5, but not on 15.6 and thus I would consider this potentially fixed. We have an upcoming Xamarin.Android build in 15.6 Preview 2 that you can try using to see if this resolves on your end as well. If you can clarify that point, we can look into backporting this into a 15.5 service release if there is still time. I am going to mark this "RESOLVED FIXED" for the time being.
Thanks Jon. I will let you know how I go with the preview.
Jon, just to let you know, I'm receiving the same build issue in 15.6.0 Preview 1.1. I take it that Preview 2 will be released sometime in the near future according to your release cadence. At which point I'll let you know if it's resolved.
I'm still experiencing this issue in 15.6.0 Preview 3.0.
Same thing here. I updated to the latest stable version 15.6 today and the issue still exists.
This should be fixed by xamarin-android/master/3b2cce2 but that is probably not going to be released unit 15.7.
For this having problems you can add the following to the top of the app csproj (just below the <Project /> element).
This ensures that the DesignTime Build gets correctly updated as the Resource files change.
Hi Dean, thanks for your reply. I added these lines in my app csproj, but it doesn't seem to change anything for me. I still get "No resource found that matches the given name".
I added the specified element as the first child of the Project element in the .apk project. Making a change to the code in that project still causes the "No resource found that matches the given name..."
Are you able to repo this. I have not been able too even with the sample project provided. If so can you provide diagnostic output for the test sample attached?
Hi, Dean. I have a customer reporting the same issue. I have diagnostic build logs. Can you reach out to me? david.hollowell@ alias
Hello. I'm not sure if I should raise an additional bug or comment here, but I'm getting a similar error with Visual Studio for Mac.
Like described in this thread, in the company I work for we have two android applications where the main application is referencing resources defined in a secondary android library. Both applications have issues building the android solution stating it can't find the resources.
Thanks for the details. Can you share the precise output from the build logs showing the error messages? For my case, we noticed that the Target Android version was set to a version different than the value specified for the option, "Compile using Android version: (Target Framework)" and the Android SDKs for the specified target Android version weren't installed.
Does this reproduce for if you set the Target Framework setting to compile latest and then step up the target android version to match the compile version?
Please see #android for the binary log
This looks like a design time build issue. The `_BuildAdditionalResourcesCache` target is being skipped because it appears to be up to date. However the obj/Debug/resource.cache file has no additional paths in it.
There was a bug where if the Design time build runs first it creates an empty resource.cache file, because _BuildAdditionalResourcesCache is NOT run as part of the design time build. This should be fixed by . In that fix we gave the design time build its own cache files so they would not interfere with the main build files. This fix should already be in the d15-7 preview channel. If would be helpful to know if anyone running d15-7 is still having the issue?
To work around deleting just the obj/Debug/resource.cache file should allow it to be regenerated.
I've been unable to repro this with VS 15.7.0 Preview 2.0.
Looks like it's resolved.
David Hollowell, Eric Schmeck, or David Kendall, please acknowledge that the issue is resolved for you. Due to the occasional nature of this issue, I'll hold off a day or two before closing the bug.
VS 15.7.0 Preview 4.0 seems to be working for me, but now ReSharper shows an error "ambiguous reference" for each Android Resource I'm using in the code. I can clear the cache for ReSharper, but next time I build, the errors returns. So I think this issue isn't resolved completely yet or is it a todo for ReSharper?
Thanks Eric. I'd say that's a Resharper issue.
After updating to Visual Studio Community version 7.5, I have also started getting "ambiguous reference" for all of my Android Resource layouts. I can still build/compile, but this error does not make sense.
I am not using Resharper, so it's not a Resharper issue.
Below are further details of my environment:
=== Visual Studio Community 2017 for Mac ===
Version 7.5 (build 1254)
Installation UUID: 53d271a3-f98b-4609-8b6e-d35987a7e847
Mono 126.96.36.199 (2017-12/8eb8f7d5e74) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 188.8.131.52 (master / 0c7c49a6)
Package version: 510010047
=== NuGet ===
=== .NET Core ===
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Xamarin.Android ===
Version: 184.108.40.206 (Visual Studio Community)
Android SDK: /Users/bsumang/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 26.0.2
Java SDK: /usr
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)