Bug 36821 - NavigationView - Uppercase 'headerLayout' name causes build error
Summary: NavigationView - Uppercase 'headerLayout' name causes build error
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 6.0.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2015-12-10 12:02 UTC by Ryan Alford
Modified: 2016-01-19 19:38 UTC (History)
2 users (show)

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


Attachments
Test app (1.67 MB, application/zip)
2015-12-10 12:02 UTC, Ryan Alford
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 for Bug 36821 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Ryan Alford 2015-12-10 12:02:36 UTC
Created attachment 14219 [details]
Test app

When using the NavigationView, if the 'headerLayout' name has any uppercase letters, it causes a build error. Once those uppercase characters are removed or changed to lowercase, the build error goes away.

I have my header XML file specified as 'Header.axml'(notice capital letter). It's just the default layout that's created...

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

In my 'Main.axml', I have the DrawerLayout and a NavigationView.

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/DrawerLayout"
    android:fitsSystemWindows="true">
    <android.support.design.widget.NavigationView
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:id="@+id/NavigationView"
        app:headerLayout="@layout/header"
        app:menu="@menu/navigationmenu" />
</android.support.v4.widget.DrawerLayout>

Notice that the 'headerLayout' has the layout name as all lowercase. This builds fine. However, if you change that line to..

----------------------------------------------------
app:headerLayout="@layout/Header"
----------------------------------------------------

which matches the actual file name, this build error occurs..

----------------------------------------------------
Error APT0000: No resource found that matches the given name (at 'headerLayout' with value '@layout/Header')
----------------------------------------------------

If the line is switched back to it's original value, the build error goes away.

I have attached a test app that exhibits this issue.
Comment 1 Ryan Alford 2015-12-10 12:02:53 UTC
Here is my Xamarin information:


=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: 00048706-b760-47fa-8d13-5150aaab514a
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Version: 0.0.0.0
Location: /Applications/XamarinProfiler.Mac.app/Contents/MacOS/XamarinProfiler.Mac

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 9.2.1.54 (Business Edition)
Hash: eb4c1ef
Branch: master
Build date: 2015-12-01 02:12:30-0500

=== Xamarin.Android ===

Version: 6.0.0.34 (Business Edition)
Android SDK: /Users/ryan/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)

=== Xamarin Android Player ===

Version: 0.4.4
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.11.2
Darwin New-Users-MBP 15.2.0 Darwin Kernel Version 15.2.0
    Fri Nov 13 19:56:56 PST 2015
    root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
Comment 2 Udham Singh 2016-01-15 11:11:34 UTC
I am able to reproduce this issue and successfully able to generate the error as mentioned in the bug description.

Screencast : http://www.screencast.com/t/VQ4NyIbn4ul
IDE Log : https://gist.github.com/Udham1/24036deaf02b6fcd6165
Application Output : https://gist.github.com/Udham1/f74866ceefb48812aa1a


Environment Info :

=== Xamarin Studio ===

Version 5.10.2 (build 51)
Installation UUID: 0922fe35-7ea3-4736-b7b6-9eddaf47d514
Runtime:
	Mono 4.2.2 (explicit/0d2cf35)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402020026

=== Xamarin.Profiler ===

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

=== Xamarin.Android ===

Version: 6.0.1.9 (Enterprise Edition)
Android SDK: /Users/360logica/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.4.1.21 (Enterprise Edition)
Hash: c71a120
Branch: master
Build date: 2016-01-12 14:45:43-0500

=== Xamarin.Mac ===

Version: 2.4.1.5 (Starter Edition)

=== Build Information ===

Release ID: 510020051
Git revision: 36453d5e06a1ad2cc8d261ad32e29abe0ed57c1f
Build date: 2016-01-12 17:33:10-05
Xamarin addins: ab25321e8918350655a7d46c86cfbaac3222fd3c
Build lane: monodevelop-lion-cycle6-c6sr1

=== Operating System ===

Mac OS X 10.11.1
Darwin ou.local 15.0.0 Darwin Kernel Version 15.0.0
    Sat Sep 19 15:53:46 PDT 2015
    root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 3 Jérémie Laval 2016-01-19 00:12:26 UTC
Resources names not fixed up in non-android attributes during build post-processing phase.