Bug 52164 - Verify <application> Element is Last in AndroidManifest.xml
Summary: Verify <application> Element is Last in AndroidManifest.xml
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 7.0 (C8)
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-01-31 22:00 UTC by Jimmy [MSFT]
Modified: 2017-06-14 21:34 UTC (History)
3 users (show)

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


Attachments
repro project (17.20 KB, application/x-zip-compressed)
2017-01-31 22:00 UTC, Jimmy [MSFT]
Details

Description Jimmy [MSFT] 2017-01-31 22:00:37 UTC
Created attachment 19671 [details]
repro project

### Overview 
According to Google's documentation[1], the <application> element must be the last element in the AndroidManifest.xml file. In scenarios where it is not the last element I've observed a noticeable decrease in performance, especially when scrolling.

The manifests for new projects created in Visual Studio and Xamarin Studio _do_ already have <application> as the last element already. However if it is changed by the developer, the generated manifest follows the new order so  this might be something we should verify while generating the manifest file if possible.

[1] https://developer.android.com/guide/topics/manifest/manifest-intro.html#filec


### Steps to Reproduce
1. Run the attached repro project, preferably on Android 5.x or below
2. Scroll through the list of items
3. Open the "Properties > AndroidManifest.xml" file
4. Modify the file so the <application> element is last
5. Run the app and scroll again


### Expected Results
The list should scroll smoothly as there are no complex items


### Actual Results
When <application> is not last the list scrolling performance is choppy.


### Environment Info
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA031
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-80000-00000-AA031
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA031
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA031
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA031
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.17.00119.9
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio   2.1.1.5
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

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

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.2.2.11 (00fa5cc)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.2.42 (501e63c)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.3.1.8 (7beaef4)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Cody Beyer (MSFT) 2017-06-14 21:34:01 UTC
Confirmed as described!

Note You need to log in before you can comment on or make changes to this bug.