Bug 52967 - Xamarin.Android build is extremely slow
Summary: Xamarin.Android build is extremely slow
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 7.1 (C9)
Hardware: PC Windows
: --- blocker
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2017-03-02 10:32 UTC by Daniel
Modified: 2017-06-16 16:39 UTC (History)
14 users (show)

Tags: xamexttriage
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 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 FIXED

Description Daniel 2017-03-02 10:32:25 UTC
I have encountered this issue after I have updated from PlayServices 29.0.0.2 to 42. I had to do this since I wanted Firebase.Crash and the minimum requirement was 30. However after multiple attempts of modification of the Android project, I discovered why this is taking so much:

 <Import Project="..\..\packages\Xamarin.Build.Download.0.4.2\build\Xamarin.Build.Download.targets" Condition="Exists('..\..\packages\Xamarin.Build.Download.0.4.2\build\Xamarin.Build.Download.targets')" />
  <Import Project="..\..\packages\Xamarin.Forms.2.3.3.193\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.3.193\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.Compat.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Compat.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Compat.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.Core.UI.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Core.UI.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Core.UI.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.Core.Utils.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Core.Utils.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Core.Utils.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Core.Utils.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.Media.Compat.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Media.Compat.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Media.Compat.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Media.Compat.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.Fragment.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Fragment.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Fragment.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Fragment.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.Transition.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Transition.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Transition.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Transition.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.v4.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.v4.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.v4.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.v4.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.v7.Palette.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.v7.Palette.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.v7.Palette.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.v7.Palette.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.v7.RecyclerView.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.v7.RecyclerView.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.v7.RecyclerView.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.v7.RecyclerView.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.Vector.Drawable.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Vector.Drawable.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Animated.Vector.Drawable.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.v7.AppCompat.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.v7.AppCompat.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.v7.AppCompat.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.Design.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Design.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Design.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.Design.targets')" />
  <Import Project="..\..\packages\Xamarin.Android.Support.v7.MediaRouter.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.v7.MediaRouter.25.1.0\build\MonoAndroid70\Xamarin.Android.Support.v7.MediaRouter.targets')" />
  <Import Project="..\..\packages\Xamarin.GooglePlayServices.Basement.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Basement.targets" Condition="Exists('..\..\packages\Xamarin.GooglePlayServices.Basement.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Basement.targets')" />
  <Import Project="..\..\packages\Xamarin.GooglePlayServices.Tasks.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Tasks.targets" Condition="Exists('..\..\packages\Xamarin.GooglePlayServices.Tasks.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Tasks.targets')" />
  <Import Project="..\..\packages\Xamarin.Firebase.Common.42.1001.0\build\MonoAndroid70\Xamarin.Firebase.Common.targets" Condition="Exists('..\..\packages\Xamarin.Firebase.Common.42.1001.0\build\MonoAndroid70\Xamarin.Firebase.Common.targets')" />
  <Import Project="..\..\packages\Xamarin.Firebase.Iid.42.1001.0\build\MonoAndroid70\Xamarin.Firebase.Iid.targets" Condition="Exists('..\..\packages\Xamarin.Firebase.Iid.42.1001.0\build\MonoAndroid70\Xamarin.Firebase.Iid.targets')" />
  <Import Project="..\..\packages\Xamarin.Firebase.Analytics.Impl.42.1001.0\build\MonoAndroid70\Xamarin.Firebase.Analytics.Impl.targets" Condition="Exists('..\..\packages\Xamarin.Firebase.Analytics.Impl.42.1001.0\build\MonoAndroid70\Xamarin.Firebase.Analytics.Impl.targets')" />
  <Import Project="..\..\packages\Xamarin.Firebase.Analytics.42.1001.0\build\MonoAndroid70\Xamarin.Firebase.Analytics.targets" Condition="Exists('..\..\packages\Xamarin.Firebase.Analytics.42.1001.0\build\MonoAndroid70\Xamarin.Firebase.Analytics.targets')" />
  <Import Project="..\..\packages\Xamarin.GooglePlayServices.Base.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Base.targets" Condition="Exists('..\..\packages\Xamarin.GooglePlayServices.Base.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Base.targets')" />
  <Import Project="..\..\packages\Xamarin.GooglePlayServices.Analytics.Impl.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Analytics.Impl.targets" Condition="Exists('..\..\packages\Xamarin.GooglePlayServices.Analytics.Impl.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Analytics.Impl.targets')" />
  <Import Project="..\..\packages\Xamarin.GooglePlayServices.Drive.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Drive.targets" Condition="Exists('..\..\packages\Xamarin.GooglePlayServices.Drive.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Drive.targets')" />
  <Import Project="..\..\packages\Xamarin.GooglePlayServices.Games.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Games.targets" Condition="Exists('..\..\packages\Xamarin.GooglePlayServices.Games.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Games.targets')" />
  <Import Project="..\..\packages\Xamarin.GooglePlayServices.Iid.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Iid.targets" Condition="Exists('..\..\packages\Xamarin.GooglePlayServices.Iid.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Iid.targets')" />
  <Import Project="..\..\packages\Xamarin.GooglePlayServices.TagManager.V4.Impl.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.TagManager.V4.Impl.targets" Condition="Exists('..\..\packages\Xamarin.GooglePlayServices.TagManager.V4.Impl.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.TagManager.V4.Impl.targets')" />
  <Import Project="..\..\packages\Xamarin.GooglePlayServices.Analytics.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Analytics.targets" Condition="Exists('..\..\packages\Xamarin.GooglePlayServices.Analytics.42.1001.0\build\MonoAndroid70\Xamarin.GooglePlayServices.Analytics.targets')" />
  <Import Project="..\..\packages\Xamarin.Firebase.Crash.42.1001.0\build\MonoAndroid70\Xamarin.Firebase.Crash.targets" Condition="Exists('..\..\packages\Xamarin.Firebase.Crash.42.1001.0\build\MonoAndroid70\Xamarin.Firebase.Crash.targets')" />


The upgrade to 42 modified my project to add these imports. If I comment these, the Visual Studio is suddenly responsive but the build is crashing. What I have tried:
<AndroidExplicitCrunch>true</AndroidExplicitCrunch> but it seems that it not working.

What is happening is that the aapt.exe process is starting and stopping after. I had a look with the Sysinternals Process Monitor and it's crunching the assets from the AppCompat library (i showed you below the log)

I have changed between:
- Java 1.8 x86 and x64
- Android build tools 23 and 25
- switching between Android SDK 7.0 and 7.1
- Using NDK 13b and 11b (the default one)
- Enable/Disable the Fast deployment stuff

What it's annoying is that this is happening even on deployment (after the rebuild is done successfully). It takes about 5 minutes to read from a solution where is stored on an SSD.

If you need more logs, let me know.

# Steps to reproduce
Add the targets in an Android project

# Expected behavior


# Actual behavior


# Supplemental info (logs, images, videos)
Project config on Debug:
- MultiDex

The logs from process monitor:
12:11:10.2805314 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-large-v4	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2805655 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-large-v4\values-large-v4.xml	SUCCESS	Filter: values-large-v4.xml, 1: values-large-v4.xml
12:11:10.2805857 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-large-v4	SUCCESS	
12:11:10.2806914 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2807288 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	Filter: values-ldltr-v21, 1: values-ldltr-v21
12:11:10.2807683 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	
12:11:10.2809449 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2809902 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	Filter: values-ldltr-v21, 1: values-ldltr-v21
12:11:10.2810189 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	
12:11:10.2811913 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2812121 PM	aapt.exe	21732	QueryBasicInformationFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	CreationTime: 3/2/2017 11:28:48 AM, LastAccessTime: 3/2/2017 12:11:08 PM, LastWriteTime: 3/2/2017 12:11:08 PM, ChangeTime: 3/2/2017 12:11:08 PM, FileAttributes: D
12:11:10.2812224 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	
12:11:10.2813132 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2813377 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21\*	SUCCESS	Filter: *, 1: .
12:11:10.2813582 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	0: .., 1: values-ldltr-v21.xml
12:11:10.2814488 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2814723 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21\values-ldltr-v21.xml	SUCCESS	Filter: values-ldltr-v21.xml, 1: values-ldltr-v21.xml
12:11:10.2814901 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	
12:11:10.2815149 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	NO MORE FILES	
12:11:10.2815273 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	
12:11:10.2816100 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2816332 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21\values-ldltr-v21.xml	SUCCESS	Filter: values-ldltr-v21.xml, 1: values-ldltr-v21.xml
12:11:10.2816501 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-ldltr-v21	SUCCESS	
12:11:10.2817440 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2817678 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	Filter: values-lo-rLA, 1: values-lo-rLA
12:11:10.2818152 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	
12:11:10.2819203 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2819438 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	Filter: values-lo-rLA, 1: values-lo-rLA
12:11:10.2819758 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	
12:11:10.2821238 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2821434 PM	aapt.exe	21732	QueryBasicInformationFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	CreationTime: 3/2/2017 11:28:48 AM, LastAccessTime: 3/2/2017 12:11:08 PM, LastWriteTime: 3/2/2017 12:11:08 PM, ChangeTime: 3/2/2017 12:11:08 PM, FileAttributes: D
12:11:10.2821551 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	
12:11:10.2822454 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2822693 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA\*	SUCCESS	Filter: *, 1: .
12:11:10.2822886 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	0: .., 1: values-lo-rLA.xml
12:11:10.2823900 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2824142 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA\values-lo-rLA.xml	SUCCESS	Filter: values-lo-rLA.xml, 1: values-lo-rLA.xml
12:11:10.2824326 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	
12:11:10.2824591 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	NO MORE FILES	
12:11:10.2824691 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	
12:11:10.2825548 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2825781 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA\values-lo-rLA.xml	SUCCESS	Filter: values-lo-rLA.xml, 1: values-lo-rLA.xml
12:11:10.2825962 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lo-rLA	SUCCESS	
12:11:10.2826958 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2827193 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lt	SUCCESS	Filter: values-lt, 1: values-lt
12:11:10.2827498 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	
12:11:10.2828573 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2828812 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lt	SUCCESS	Filter: values-lt, 1: values-lt
12:11:10.2829113 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res	SUCCESS	
12:11:10.2830593 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lt	SUCCESS	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2830789 PM	aapt.exe	21732	QueryBasicInformationFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lt	SUCCESS	CreationTime: 3/2/2017 11:28:47 AM, LastAccessTime: 3/2/2017 12:11:08 PM, LastWriteTime: 3/2/2017 12:11:08 PM, ChangeTime: 3/2/2017 12:11:08 PM, FileAttributes: D
12:11:10.2830885 PM	aapt.exe	21732	CloseFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lt	SUCCESS	
12:11:10.2831743 PM	aapt.exe	21732	CreateFile	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lt	SUCCESS	Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
12:11:10.2831972 PM	aapt.exe	21732	QueryDirectory	C:\my_super_project_path\\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res\values-lt\*	SUCCESS	Filter: *, 1: .



# Test environment (full version information)
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Xamarin   4.3.0.784 (73f58d6)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.1.0.41 (9578cdc)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.4.0.123 (35d1ccd)
Visual Studio extension to enable development for Xamarin.iOS.


----------- Build Result:
3>
3>Task Performance Summary:
3>        0 ms  GetReferenceAssemblyPaths                  1 calls
3>        0 ms  ValidateAppxManifestItems                  1 calls
3>        0 ms  ResolveNonMSBuildProjectOutput             1 calls
3>        0 ms  GetFrameworkPath                           1 calls
3>        1 ms  GetSdkPropertyValue                        2 calls
3>        1 ms  FindAppConfigFile                          1 calls
3>        1 ms  Message                                   28 calls
3>        1 ms  ResolveCodeAnalysisRuleSet                 1 calls
3>        1 ms  CallTarget                                 9 calls
3>        1 ms  AssignProjectConfiguration                 1 calls
3>        1 ms  AssignCulture                              3 calls
3>        1 ms  MakeDir                                    4 calls
3>        2 ms  CreateCSharpManifestResourceName           3 calls
3>        2 ms  ExpandPayloadDirectories                   1 calls
3>        3 ms  FixedCreateCSharpManifestResourceName      1 calls
3>        3 ms  AssignTargetPath                           6 calls
3>        4 ms  ConvertToAbsolutePath                      1 calls
3>        5 ms  ReadLinesFromFile                          2 calls
3>        7 ms  FindUnderPath                              7 calls
3>        9 ms  WriteLinesToFile                           2 calls
3>       10 ms  RemoveDuplicates                           3 calls
3>       14 ms  MSBuild                                    4 calls
3>       41 ms  Delete                                     5 calls
3>       44 ms  GenerateResource                           1 calls
3>      101 ms  XamlGTask                                 16 calls
3>      131 ms  AL                                         1 calls
3>      135 ms  Copy                                       5 calls
3>      140 ms  Csc                                        1 calls
3>      170 ms  ResolveAssemblyReference                   1 calls
3>     5861 ms  XamlCTask                                  1 calls
3>
3>Build succeeded.
Comment 1 Daniel 2017-03-02 10:47:17 UTC
I had a look to one of the runs of the aapt.exe command line, and this were the arguments which it was launched by devenv.exe

"C:\Users\Daniel\AppData\Local\Xamarin\Universal\AndroidSDK\build-tools\25.0.2\aapt.exe"  package -f -m -M C:\Users\Daniel\AppData\Local\Temp\nf3sifw0.pxi\manifest\AndroidManifest.xml -J C:\Users\Daniel\AppData\Local\Temp\nf3sifw0.pxi --custom-package ro.cleverever -F C:\Users\Daniel\AppData\Local\Temp\nf3sifw0.pxi\resources.apk.bk -S obj\Debug\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Acr.Settings\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Acr.Support.Android\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Acr.UserDialogs\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\AndHUD\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\FFImageLoading.Forms.Droid\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\FFImageLoading.Platform\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\FFImageLoading.Transformations\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Parse.Android\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Splat\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Toasts.Forms.Plugin.Droid\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\UXDivers.Artina.Shared.Droid\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Forms.Platform.Android\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Forms.Platform\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.InAppBilling\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Android.Support.Transition\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.RecyclerView\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.MediaRouter\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Basement\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Base\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.GooglePlayServices.TagManager.V4.Impl\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Firebase.Crash\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\FFImageLoading.Transformations\library_project_imports\res -S C:\my_super_project_path\obj\Debug\resourcecache\88821850540BB415DEA665AF18FE6DD0\res -j obj\Debug\__library_projects__\FormsViewGroup\library_project_imports\formsviewgroup.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Animated.Vector.Drawable\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Compat\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Core.UI\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Core.Utils\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Design\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Fragment\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Media.Compat\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Transition\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.v4\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.v7.MediaRouter\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.v7.Palette\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.v7.RecyclerView\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Vector.Drawable\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Firebase.Analytics\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Firebase.Analytics.Impl\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Firebase.Common\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Firebase.Crash\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Firebase.Iid\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Analytics\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Analytics.Impl\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Base\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Basement\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Drive\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Games\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Iid\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.TagManager.V4.Impl\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Tasks\library_project_imports\classes.jar -I C:\Users\Daniel\AppData\Local\Xamarin\Universal\AndroidSDK\platforms\android-24\android.jar --extra-packages android.support.graphics.drawable.animated:android.support.compat:android.support.coreui:android.support.coreutils:android.support.design:android.support.fragment:android.support.mediacompat:android.support.transition:android.support.v4:android.support.v7.appcompat:android.support.v7.mediarouter:android.support.v7.palette:android.support.v7.recyclerview:android.support.graphics.drawable:com.google.android.gms.measurement:com.google.android.gms.measurement.impl:com.google.firebase:com.google.firebase.crash:com.google.firebase.iid:com.google.android.gms.analytics:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.drive:com.google.android.gms.games:com.google.android.gms.iid:com.google.android.gms.tagmanager:com.google.android.gms.tasks --no-crunch --auto-add-overlay --no-version-vectors --max-res-version 24


-------------- And this is another run of the aapt.exe

"C:\Users\Daniel\AppData\Local\Xamarin\Universal\AndroidSDK\build-tools\25.0.2\aapt.exe"  package -f -m -M C:\Users\Daniel\AppData\Local\Temp\v0svscoa.gul\manifest\AndroidManifest.xml -J C:\Users\Daniel\AppData\Local\Temp\v0svscoa.gul --custom-package ro.cleverever -F C:\Users\Daniel\AppData\Local\Temp\v0svscoa.gul\resources.apk.bk -S obj\Debug\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Acr.Settings\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Acr.Support.Android\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Acr.UserDialogs\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\AndHUD\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\FFImageLoading.Forms.Droid\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\FFImageLoading.Platform\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\FFImageLoading.Transformations\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Parse.Android\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Splat\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Toasts.Forms.Plugin.Droid\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\UXDivers.Artina.Shared.Droid\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Forms.Platform.Android\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Forms.Platform\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.InAppBilling\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Android.Support.Transition\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.RecyclerView\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Android.Support.Design\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Android.Support.v7.MediaRouter\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Basement\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Base\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.GooglePlayServices.TagManager.V4.Impl\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\Xamarin.Firebase.Crash\library_project_imports\res -S C:\my_super_project_path\obj\Debug\__library_projects__\FFImageLoading.Transformations\library_project_imports\res -S C:\my_super_project_path\obj\Debug\resourcecache\88821850540BB415DEA665AF18FE6DD0\res -j obj\Debug\__library_projects__\FormsViewGroup\library_project_imports\formsviewgroup.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Animated.Vector.Drawable\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Compat\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Core.UI\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Core.Utils\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Design\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Fragment\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Media.Compat\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Transition\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.v4\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.v7.AppCompat\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.v7.MediaRouter\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.v7.Palette\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.v7.RecyclerView\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Android.Support.Vector.Drawable\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Firebase.Analytics\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Firebase.Analytics.Impl\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Firebase.Common\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Firebase.Crash\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.Firebase.Iid\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Analytics\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Analytics.Impl\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Base\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Basement\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Drive\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Games\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Iid\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.TagManager.V4.Impl\library_project_imports\classes.jar -j obj\Debug\__library_projects__\Xamarin.GooglePlayServices.Tasks\library_project_imports\classes.jar -I C:\Users\Daniel\AppData\Local\Xamarin\Universal\AndroidSDK\platforms\android-24\android.jar --extra-packages android.support.graphics.drawable.animated:android.support.compat:android.support.coreui:android.support.coreutils:android.support.design:android.support.fragment:android.support.mediacompat:android.support.transition:android.support.v4:android.support.v7.appcompat:android.support.v7.mediarouter:android.support.v7.palette:android.support.v7.recyclerview:android.support.graphics.drawable:com.google.android.gms.measurement:com.google.android.gms.measurement.impl:com.google.firebase:com.google.firebase.crash:com.google.firebase.iid:com.google.android.gms.analytics:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.drive:com.google.android.gms.games:com.google.android.gms.iid:com.google.android.gms.tagmanager:com.google.android.gms.tasks --no-crunch --auto-add-overlay --no-version-vectors --max-res-version 24win

If I looked to the differences, I see that the arguments are the same, except is a temporary file



Let me know if you need more logs
Comment 2 Songtive Team 2017-03-08 21:09:16 UTC
I experience the same problem developing using VS2015. Also please note that OSX dev machines with Xamarin Studio builds application N times faster.
Comment 3 Songtive Team 2017-03-08 21:15:17 UTC
Additionally, I've narrowed down the problem to the package:
    <Reference Include="Xamarin.Android.Support.v7.AppCompat">
      <HintPath>..\..\..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll</HintPath>
    </Reference>

deleting this package decreases the build time from 11secs to 3secs.
Comment 4 Przemysław Raciborski 2017-03-09 09:04:51 UTC
I am almost sure that it is caused by AAPT task. It is really slow on Visual Studio
Comment 5 Daniel 2017-03-09 09:07:23 UTC
I reverted the Play Services to version 32 and it seems that the problem not went away. After I reverted back to v4 24.2.1 everything went smoothly and the build is quite fast.

I highly recommend anyone to do the same until this will be addressed.


Thanks
Comment 6 Songtive Team 2017-03-09 09:28:57 UTC
@Daniel, 

That was my observation too. With v4 it builds pretty fast but once I added v7 the build performance went down significantly.
Comment 7 mv 2017-03-10 13:19:34 UTC
Same problem here, after add Firebase Messaging version 42 and Firebase Analytics version 42 references from nuget, VS 2015 start hang and aapt.exe consume 99% CPU.
After remove Firebase Messaging, Firebase Analytics and Play Services the problem gone.
I guess it´s a problem with those libraries.
Comment 8 Julien Van Dooren 2017-03-13 09:38:03 UTC
Same for me.
Once I installed the Firebase assemblies and thus updated everything to V7, the build/deploy/debug time is now considerably slowed.
Another thing that could also explain the problem is that I had to set up my Android application as Multidex.
Comment 9 Kent 2017-03-15 01:10:13 UTC
Getting this whenever I add/update a package. So frustrating trying to update my dependencies right now.
Comment 10 Preetham 2017-03-16 03:00:58 UTC
I am facing the same issue with VS2017 Enterprise and the latest Xamarin Stable build. Another commonality is that I am using Firebase (Auth) in my project, version 42.1001.0. In my references, all the Firebase, Xamarin.Android.Support and Xamarin.GooglePlayServices libraries show up with the yellow triangle as if they are not installed, but when I go to manage Nuget packages, they all show up as installed, the code compiles fine.

When I do a build or deploy, I see aapt.exe show up constantly in Task Manager, and slows the build/deploy process considerably.
Comment 11 Kent 2017-03-16 03:33:04 UTC
This issue is absolutely killing me. I've tried <AndroidExplicitCrunch>true</AndroidExplicitCrunch> to no real benefit.

Since installing Firebase, my builds are now failing with useless errors too:

    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2080,3): error MSB6006: "java.exe" exited with code 2.

And when they fail, off goes aapt.exe for another 3 or 4 minutes, doing its thing and blocking VS in the process. This is true with 1G Java help and 2G. It's true without Multi-Dex and when I enable it I get:

    Expecting class path separator ';' before '\Android\android-sdk\build-tools\25.0.1\lib\shrinkedAndroid.jar' in argument number 8

Just did a git clean -xdf and now I'm getting completely different errors along the lines of:

    \Src\UI.Droid\Resources\values\styles.xml(2): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
    \Src\UI.Droid\Resources\values\styles.xml(3): error APT0000: No resource found that matches the given name: attr 'colorAccent'.
    \Src\UI.Droid\Resources\values\styles.xml(2): error APT0000: No resource found that matches the given name: attr 'colorPrimary'.
    \Src\UI.Droid\Resources\values\styles.xml(2): error APT0000: No resource found that matches the given name: attr 'colorPrimaryDark'.
    \Src\UI.Droid\Resources\values\styles.xml(2): error APT0000: No resource found that matches the given name: attr 'windowActionBar'.
    \Src\UI.Droid\Resources\values\styles.xml(4): error APT0000: No resource found that matches the given name: attr 'windowActionModeOverlay'.
    \Src\UI.Droid\Resources\values\styles.xml(2): error APT0000: No resource found that matches the given name: attr 'windowNoTitle'.
    \Src\UI.Droid\Resources\values\styles.xml(4): error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'.
    \Src\UI.Droid\Resources\values\styles.xml(4): error APT0000: No resource found that matches the given name: attr 'colorAccent'.

Deleted and regenerated Resources\Resource.Designer.cs file in my Droid project, then tried to build again. Now it's back to the problem with exit code 2 and aapt.exe going crazy.

It's so disappointing to me that this tooling is still such a house-of-cards. Literally considering a career in agriculture at this point.
Comment 12 Kent 2017-03-16 03:56:10 UTC
Literally can't even open my solution now without aapt.exe blocking VS for several minutes.
Comment 13 dean.ellis 2017-03-16 11:07:26 UTC
This looks on the surface very similar to https://bugzilla.xamarin.com/show_bug.cgi?id=44622. Is anyone able to provide full diagnostic build output? Or even better a sample app which exhibits the issue so we can replicate it here.
Comment 14 Preetham 2017-03-16 13:17:22 UTC
I am having a hard time creating a sample app to replicate the issue, but the problem in my case is not really when it builds, but when it deploys.

The logs show that the build succeeded, and the deploy succeeded, but the bar at the bottom of Visual Studio stays blue, with the text "Start debugging Android application ...". At this stage Visual Studio just churns, with aapt being called many times. I don't see any of this show up in the build log. Is there any other Xamarin log I can check to see what is going on at this point in time? We have a large project, so I end up waiting over 15 minutes or more for the application to show up on the phone.

I ran into the same issue that Kent is running into where it takes really long to open the solution, with aapt running a large number of times. I tried starting devenv with the log switch, but nothing shows up related to this issue in that log either. I will be happy to provide diagnostic information if you can tell me where to look!
Comment 15 Daniel 2017-03-16 13:20:00 UTC
I had the same behavior on the Deployment as well .. it seems that after the build succeeds, the aapt starts eating CPU again.

However, please read the hint which I have provided earlier. For me downgrading the versions have fixed my issue, and I would highly recommend for you as well until you need the latest ones ...
Comment 16 dean.ellis 2017-03-16 13:38:30 UTC
Also I've been told that this version of the Xamarin.Build.Download package helps fix the issue

https://www.nuget.org/packages/Xamarin.Build.Download/0.4.3-beta2
Comment 17 dean.ellis 2017-03-16 13:40:32 UTC
@Preeetham 

You can try getting the desidgntime logs , that is probably where the issue is.

1. Close Visual Studio
2. Open a Visual Studio Developer Command Prompt
3. Set environment variable “TraceDesignTime” to true (set TraceDesignTime=true)
4. Delete .vs directory/.suo file
5. Restart VS from the command prompt you set the environment varaible (devenv)
6. Open the solution
7. Check 'C:\Users\fabio\AppData\Local\Temp\\*.designtime.log'
Comment 18 Preetham 2017-03-16 14:44:23 UTC
After I upgraded to the 0.4.3-beta2 package and rebuilt and restarted the solution a couple of times my deploy times have halved and I don't see aapt in the task manager anymore! However, my projects appear to be rebuilt a lot more now, and I get random build errors which do away when I hit deploy a second time. The errors appear to be originating from Xamarin.Build.Download.targets, and I will update this bug with more information if I am reproduce this issue reliably.
Comment 19 Julien Van Dooren 2017-03-16 14:56:10 UTC
Same for me after the 0.4.3-beta2 update, the deploy/debug is a lot faster but incremental builds are gone which reduces the debug speed gain to less than 0.

After that, I return to 0.4.2 (stable) and the incremental build works again but oddly it seems that the deploy/debug is still faster.

So for now, I do not touch the config anymore and I can work quite normally.
Comment 20 Preetham 2017-03-16 15:48:46 UTC
My projects seem to be rebuilt with the reason given as:

Project 'xxx' is not up to date. Input file 'F:\git\Project\packages\Xamarin.Android.Support.Compat.25.1.1\lib\MonoAndroid70\Xamarin.Android.Support.Compat.dll' is modified after output file ''.

As the dll in question is coming from a NuGet package, I don't know why its being marked as modified, and I can't tell if this is related to upgrade to the beta package or not.
Comment 21 dean.ellis 2017-03-16 16:11:54 UTC
can you check the modified date time of the dll in question. There was a very old bug where something in nuget was setting the date in the future.
Comment 22 Preetham 2017-03-16 17:48:49 UTC
@Dean The date is not in the future, but it appears that every time I try to deploy, the packages are being restored, leading to a change in the modified time to the current time, which results in a rebuild. 

The other intermittent exception that I get when I try to build is:

2>F:\git\project\packages\Xamarin.Build.Download.0.4.3-beta2\build\Xamarin.Build.Download.targets(109,4): error MSB4064: The "VsInstallRoot" parameter is not supported by the "XamarinBuildAndroidAarRestore" task. Verify the parameter exists on the task, and it is a settable public instance property.
2>F:\git\project\packages\Xamarin.Build.Download.0.4.3-beta2\build\Xamarin.Build.Download.targets(103,3): error MSB4063: The "XamarinBuildAndroidAarRestore" task could not be initialized with its input parameters. 
2>Done executing task "XamarinBuildAndroidAarRestore" -- FAILED. (TaskId:292)
2>Done building target "_XamarinAndroidBuildAarRestore" in project "AndroidApp.csproj" -- FAILED.: (TargetId:244)

Sometimes deploying again make these errors go away, and at other times I have to restart Visual Studio.
Comment 23 Bill Holmes 2017-03-16 20:19:02 UTC
@Preetham yes 0.4.3-beta2 version of Xamarin Build Download is changing the dll in the packages folder.  You can see my changes here.  

https://github.com/xamarin/XamarinComponents/pull/128

I am guessing that during build we update the dll to include the resources then VS or NuGet sees the file is changed and restores it to the original state.  I will have to check the logs to verify this.

So where we stand now is that if we overwrite the dll in the packages folder we break incremental builds. If we write out the dll to the intermediate directory and change the references list during the build to point to the intermediate dlls the design time builds kill the IDE performance.  

I am running out of ideas.  @Dean we really need the aar native reference node!
Comment 24 dean.ellis 2017-03-16 20:26:39 UTC
@Preetham

If you don't mind digging into the .target you can try to apply the change from  [1].

The File you will need to edit is Xamarin.Android.Common.targets.
It should be in the Program Files (z86)\MSBuild\Xamarin\Android folder. 
You can try to update the "UpdateAndroidResources" to include _CreatePropertiesCache just as it is in [1]. That might fix the issue of the design time build going nuts.


[1] https://github.com/xamarin/xamarin-android/commit/13b3622ad45a33fb461c8b7e328ef0f4f3d02181#diff-db39bf07b89b50eaab8ab2001546310cR1023
Comment 25 Bill Holmes 2017-03-16 20:49:08 UTC
Amazing how responding to a bug can get you thinking....  

See my latest commit.
https://github.com/xamarin/XamarinComponents/pull/128/commits/99797ec4ea81d8e957a782614d7856da3de02f76

Turns out that 0.4.3-beta2 was writing out the dll every time you built.  That should work around it.  My single char change incremental builds are really fast now.  I will look for a better way to do this before we go stable.  

NuGet has been pushed.  Just need to get NuGet to index it.  Should take a few more minutes.
https://www.nuget.org/packages/Xamarin.Build.Download/0.4.3-beta3
Comment 26 Julien Van Dooren 2017-03-17 06:26:25 UTC
Xamarin Build Download Version 0.4.3-beta3 works for me. I have incremental build and fast deployment/debug.
Thank you Bill, you save my day.
Comment 27 Preetham 2017-03-17 12:58:20 UTC
Beta3 appears to have fixed the rebuild every time issue! I still see the intermittent errors listed in comment 22, but I can't reproduce it reliably. Every time it happens, hitting Deploy once or twice results in the errors going away and deploying to the device.

@Dean Would you still like me to try the changes listed in Comment 24?
Comment 28 dean.ellis 2017-03-17 13:27:04 UTC
@Preetham, you can if you like, it should help the design time build issue, which is probably not related to the component issue.
Comment 29 Bill Holmes 2017-03-17 17:01:56 UTC
@Preetham re:comment 22

The "XXX" parameter is not supported by the "YYY" task suggests that the tasks dll loaded into VS does not match the targets file.  When you update the NuGet you should be getting a prompt to restart VS (some do not get the prompt.)  When you do the error should go away.  However I have heard that is not good enough for some reason.  For one [person][1] after restarting the error persisted.  They did get it working eventually but never really reported how they did it.  

I am not sure what the bug is here.  Is there more I can be doing in the NuGet to help VS?  Is this a VS bug?   We will continue to investigate.

[1]: https://forums.xamarin.com/discussion/comment/259527#Comment_259527
Comment 30 Daniel Katz 2017-03-20 18:36:28 UTC
I was able to reproduce the issue reliably on VS2017RTM, so I've made a reduction of the problem.
Also, IMO, the issue with slowness on VS2017 is a related but separate issue rooted in the GoogleServicesJson build action implementation.

The commits in the following repo are the steps to reproduce both the build slowness and the VS2017 slowness. see comments there.

https://github.com/danielkatz/Repro52967
Comment 31 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-23 01:02:49 UTC
## Non-engineering team status update

I was able to replicate the original symptom on this bug report (from Comment 0) locally today in a small sample test case and was able to verify a candidate fix from Comment 23 in that scenario.

I filed a new bug to provide a clean description of the current status of that particular issue (Bug 53817).  I would recommend that this bug be marked as a duplicate of that bug for bookkeeping.  If needed, a separate new bug can be opened to track the slightly different _incremental build_ symptom that has been under discussion starting at Comment 18.  On the other hand, it sounds like that issue is also resolved at this time, and the only remaining open issue on this report is a _third_ symptom from Comment 22.  I would definitely recommend that any further discussion of that third symptom be moved onto its own new bug report.  Thanks!
Comment 32 Jonathan Pryor 2017-06-16 16:39:53 UTC
Marking as FIXED as per Comment #31:

The "clean description" is in Bug #53817, and appears to match Comment #30.

The incremental build symptom in Comment #18 appears to have been fixed, as per Comment #25 and Comment #27:

> Beta3 appears to have fixed the rebuild every time issue!

The symptom in Comment #22 isn't consistently reproducible, and may be addressed by Comment #29.