Bug 12198 - Getting build error when try to create splash screen on MFA application with trial License
Summary: Getting build error when try to create splash screen on MFA application with ...
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.7.x
Hardware: PC Mac OS
: --- normal
Target Milestone: 4.8 (async)
Assignee: Jonathan Pryor
Depends on:
Reported: 2013-05-10 14:53 UTC by Atin
Modified: 2013-05-14 10:35 UTC (History)
5 users (show)

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

AndroidAppSts (71.97 KB, application/zip)
2013-05-10 14:53 UTC, Atin

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:

Description Atin 2013-05-10 14:53:19 UTC
Created attachment 3947 [details]

Steps to reproduce:
1. Open X.S.
2. Create any android application.
3. Add any image to the Resources\Drawable folder.
4. Create a new xml file in Resources\Values called Styles.xml and paste code
 mention in docs.
5. Add a new activity to your project called SplashActivity, and paste the code
mention in docs.
6. change the namespace in the copied code to match the namespace of project. 
7. Debug or run the application.

Actual result:
User is not able to add splash screen for android application.Application
giving build error.

Below is the gist for the same:

Expected result:
Splash screen should show up as soon after the user launches application on

Environment details:
All mac and windows
XS 4.0 (build 2968) - e606632dfc7d2f59e31abd8d7ae0b222194abb7c
Mono 3.0.11 ((no/edc181c)
MFA 4.7.4-14

Note : We have use following documents for creating a splash screen.
Comment 1 Jonathan Pryor 2013-05-10 16:07:21 UTC
Please build with Diagnostic build output. When I do so, I get:

> error : Tool exited with code: 1. Output: obj/Debug/res/values/styles.xml:1: error: Invalid start tag LinearLayout

Edit Resources\Values\Styles.xml, remove the <LinearLayout/> root element (making <resource/> the  root element), rebuild, and there are no more errors.
Comment 2 Nischal 2013-05-13 02:22:23 UTC
After removing  <LinearLayout/> root element, we are successfully able to build and run application and we are able to see splash screen.

Changing the status to Verified.
Comment 3 PJ 2013-05-13 12:48:46 UTC
This tutorial and test case should not need manual .axml editing. Is this just an XS bug?

Nischal, can you confirm that running the steps in the document exactlty results in this behavior? If so, that's not really acceptable...
Comment 4 Jonathan Pryor 2013-05-13 13:16:05 UTC
I don't see how following the steps in the docs exactly would result in that behavior, given that "LinearLayout" doesn't appear _anywhere_ in the docs.

Although... in $2 Create a Theme with Your Splash Screen, it says:

> Create a new xml file in Resources\Values called Styles.xml, and paste in this code:

That doesn't say _what kind_ of file to create. Thus it's plausible that if you just right-click Resources > Add > New Item..., the default type will be Android Layout/etc., which will generate something other than <resources/> as the root element.

Perhaps we need to clarify the docs?
Comment 5 bryan costanich 2013-05-13 13:38:06 UTC
Tom, can you add additional detail to the doc, please?
Comment 6 Tom Opgenorth 2013-05-13 18:00:43 UTC
Updated the sample with some screenshots showing
* that an Empty XML file should be added
* the build action of the XML file should be AndroidResource.
Comment 7 narayanp 2013-05-14 03:34:18 UTC
PJ, I think document has changed now when we add empty .xml file in Resource/Value folder, we are not seeing <LinearLayout/> root element so we are just copying and pasting xml code into that file and application working fine as per all the steps which are mentioned in document.
Comment 8 PJ 2013-05-14 10:35:38 UTC
Ok good stuff. Yeah the document has indeed changed see comment 6 :D.

Verifying based on comment 7