android: Updating to Visual Studio Community 7.5 causes ambiguous resource layouts

Steps to Reproduce

  1. upgrade to Visual Studio Community 7.5
  2. now getting an error about ambiguous resource layouts

Expected Behavior

no layout issues

Actual Behavior

IDE is reporting ambiguous Android resource layouts for all Android layouts

Version Information

7.5

=== Visual Studio Community 2017 for Mac ===

Version 7.5 (build 1254) Installation UUID: 53d271a3-f98b-4609-8b6e-d35987a7e847 Runtime: Mono 5.10.1.47 (2017-12/8eb8f7d5e74) (64-bit) GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 4.4.0.36 (master / 0c7c49a6)

Package version: 510010047

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 2.0.5 2.0.0 SDK: /usr/local/share/dotnet/sdk/2.1.4/Sdks SDK Versions: 2.1.4 2.0.0 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.2 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 8.3.0.19 (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™ SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot™ 64-Bit Server VM (build 25.131-b11, mixed mode)

Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.4.0 Hash: b3f92f9 Branch: master Build date: Fri, 19 Jan 2018 22:00:34 GMT Client compatibility: 1

=== Apple Developer Tools ===

Xcode 9.3 (14154) Build 9E145

=== Xamarin.Mac ===

Version: 4.4.1.176 (Visual Studio Community)

=== Xamarin.iOS ===

Version: 11.10.1.177 (Visual Studio Community) Hash: 7e782c1e Branch: d15-7 Build date: 2018-04-25 15:27:13-0400

=== Build Information ===

Release ID: 705001254 Git revision: 498923ea36d2c7fe440c4e4b8cfb75bd50bbd748 Build date: 2018-05-05 10:35:24-04 Xamarin addins: 219f1c4943b4693b837b4173dd10ea982a47c852 Build lane: monodevelop-lion-d15-7

=== Operating System ===

Mac OS X 10.13.4 Darwin 17.5.0 Darwin Kernel Version 17.5.0 Fri Apr 13 19:32:32 PDT 2018 root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

NuGet Package Explorer 0.2 NuGet Package Management Extensions 0.12.2 Internet of Things (IoT) development (Preview) 7.1

Log File

(IDE issue, not device related)

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 11
  • Comments: 19 (5 by maintainers)

Commits related to this issue

Most upvoted comments

The error message is as follows: "Ambiguity between ‘Resource.Id.some_value’ and ‘Resource.Id.some_value’

Yes, there is a designtime folder in obj/Debug. I have tried doing a “Clean All”, then deleting all the files under obj/Debug, then a Build. The designtime folder gets recreated, and the issue still persists.

I put dellis1972’s code into PropertyGroup in csproj

<AndroidUseManagedDesignTimeResourceGenerator Condition=" '$(AndroidUseManagedDesignTimeResourceGenerator)' == '' And '$(OS)' != 'Windows_NT' ">False</AndroidUseManagedDesignTimeResourceGenerator>

It is not working. Intellisense still given error about Ambiguous reference.

But works fine if I put

<AndroidUseManagedDesignTimeResourceGenerator>False</AndroidUseManagedDesignTimeResourceGenerator>

. Windows10 pro version1803 VS2017 15.7.3 Xamarin.Android 8.3.3.2(head/dffc59120)

We merged a temporary fix into master. For those of you hitting this issue you can add

<AndroidUseManagedDesignTimeResourceGenerator Condition=" '$(AndroidUseManagedDesignTimeResourceGenerator)' == '' And '$(OS)' != 'Windows_NT' ">False</AndroidUseManagedDesignTimeResourceGenerator>

to your csproj. Note that we only disable this feature on Mac. VS2017 needs to have this feature for intelligence so just disabling AndroidUseManagedDesignTimeResourceGenerator across all platforms could cause problems on Windows.

Having the same issue in the latest stable vs mac