Bug 36487 - aapt errors not converted to MSBuild errors
Summary: aapt errors not converted to MSBuild errors
Status: NEEDINFO
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 6.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2015-12-02 22:06 UTC by Mikayla Hutchinson [MSFT]
Modified: 2018-02-23 18:24 UTC (History)
3 users (show)

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

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 36487 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:
NEEDINFO

Description Mikayla Hutchinson [MSFT] 2015-12-02 22:06:35 UTC
To repro:

Add /multiple/ drawable resources with dashes in their names. Build the app.

On Mac, I get a single multi-line error message with useless information (code 1?), with the location as the MSBuild targets.

Tool exited with code: 1. Output: res/drawable/fff-s.jpg: Invalid file name: must contain only [a-z0-9_.]
res/drawable/foo-bar.jpg: Invalid file name: must contain only [a-z0-9_.]


What it should be is two distinct errors with the location parsed/split from the aapt message.

res/drawable/fff-s.jpg: Invalid file name: must contain only [a-z0-9_.]
res/drawable/foo-bar.jpg: Invalid file name: must contain only [a-z0-9_.]
Comment 1 Atin 2016-01-13 11:33:55 UTC
I have checked this issue and able to reproduce the reported behavior given in the bug description. I have added multiple drawable resources with dashes. When I build the project then I got single error.

Screencast: http://www.screencast.com/t/dmJocHjnBu
Build Output: https://gist.github.com/saurabh360/14533f4901519c07e9fd
Ide Logs: https://gist.github.com/saurabh360/9c6abb84525c9c94415c
Error: https://gist.github.com/saurabh360/597f789768c0bb88ba02

Environment Info;

=== Xamarin Studio ===

Version 5.10.2 (build 49)
Installation UUID: 2591d519-875d-4afe-a3d9-5fcf391bbd2d
Runtime:
	Mono 4.2.2 (explicit/11c1351)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010003

=== Xamarin.Profiler ===

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

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.4.1.20 (Enterprise Edition)
Hash: 122b860
Branch: master
Build date: 2016-01-05 20:20:30-0500

=== Xamarin.Android ===

Version: 6.0.1.5 (Business Edition)
Android SDK: /Users/nischal/Desktop/sdkndk/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)
		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
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

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

=== Xamarin.Mac ===

Version: 2.5.0.3111 (Business Edition)

=== Build Information ===

Release ID: 510020049
Git revision: deed4cd240ff3611c8742bbc62296e207f46173d
Build date: 2015-12-17 11:13:36-05
Xamarin addins: 8bd975e7b465f6fe812b64d736f3b7e8c1a79a3e
Build lane: monodevelop-lion-cycle6-c6sr1

=== Operating System ===

Mac OS X 10.10.5
Darwin nischal.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 2 Darrell Tunnell 2018-02-22 16:54:34 UTC
I am seeing this also. Has this not been fixed?
Comment 3 dean.ellis 2018-02-22 17:04:01 UTC
This seems to be fixed on the latest stable release. 

Can you provide details of the error you are seeing and the product version numbers?
Comment 4 Darrell Tunnell 2018-02-23 18:24:21 UTC
I am using vs2017 latest stable release. I have approx 15 .png files as AndroidResources in my android project, many of which use _ in their names and some of which don't. I added one more with an underscore in the file name and did a build as normal and I see a build error:

Invalid file name: must contain only [a-z0-9_.]

Clicking it takes me to the targets.
Im using 27.0.3 android build tools.

Renaming the file i added to remove the underscore fixes the error.

Which other version mumbers would you like?