[ALOY-1048] Alloy: A warning appears in index.xml file while creating default Alloy project

GitHub Issuen/a
Resolution Date2014-06-18T13:53:42.000+0000
Affected Version/sAlloy 1.4.0, Alloy 1.3.1
Fix Version/sAlloy 1.5.0, Alloy 1.4.0
ComponentsSamples & Templates
Labelsqe-3.3.0, qe-testadded
ReporterPragya Rastogi
AssigneeFeon Sua Xin Miao


A warning sign appears on index.js for default alloy project saying {color:red}"The id 'label' is not referenced in any style rules"{color} Refer !AlloyWarning.png! *Steps to replicate:* 1. Create a default alloy project +Actual+: Observe there appears a warning sign on project name. Expand the project and observe that index.xml throws the error "The id 'label' is not referenced in any style rules" +Expected+: No warning must appear on default project {color: green}Workaround: Adding code "#label":{} in index.tss file removes the warning.{color}


Screen Shot 2014-06-16 at 3.52.57 pm.png2014-06-16T08:00:36.000+000022929


  1. Ingo Muschenetz 2014-06-09 [~skypanther] Not positive if this is a bug, but sounds like we should change the Alloy template for now.
  2. Tim Poulsen 2014-06-09 Make sure to also confirm that no such warnings appear with the Two-tab template while we're at it.
  3. Feon Sua Xin Miao 2014-06-16 No warning signs for Two-tab template.
  4. Feon Sua Xin Miao 2014-06-16 PR: https://github.com/appcelerator/alloy/pull/449 Functional Test: 1. Create a default Alloy project 2. No warning sign appears next to
  5. Tim Poulsen 2014-06-16 PR merged
  6. Pragya Rastogi 2014-06-18 {color:red}Reopening this issue as *NOT FIXED* for the build:{color} || *Component* || *Version*|| |OS | OSX 10.9.3 , Ubuntu 12.04, Windows 8.1| |Xcode | 5.1.1 | |Titanium Studio | | |Appcelerator Studio | | |SDK | 3.3.0.v20140617161713 | |acs | 1.0.14 | |alloy | 1.4.0-rc | |npm | 1.3.2 | |titanium | 3.3.0-rc | |titanium-code-processor | 1.1.1 |
  7. Ingo Muschenetz 2014-06-18 I believe so, but I think we should also cherry-pick the change to 1.4.0 unless it's risky. It's not a great user experience.
  8. Tim Poulsen 2014-06-18 The fix was for the 1.5.0 branch. Failure on 1.4.0-rc should have been expected. I attempted to cherry-pick the change into the 1_4_X branch, but git reported the commit was now empty. So, I manually back-ported the fix New PR https://github.com/appcelerator/alloy/pull/455 Merged
  9. Federico Casali 2014-06-20 Verified fixed. TiSDk 3.3.0.v20140620104112 Appcelerator Studio CLI 3.3.0-rc2 Alloy 1.4.0-rc2 Closing.
  10. Manuel Conde Vendrell 2014-07-17 Mmm, today was the release of 3.3.0 I always update in one of my machines when this happens. So I open my project (in Windows 64bit) with the new release and... all my .xml files are full of warnings about "is not referenced in any styles rules". I can compile anyway, but... is fixed or not?
  11. Ingo Muschenetz 2014-07-17 This fix here was an invalid template, where there actually was something wrong. Can you give an example of where you have a valid XML and TSS but it still gives you a warning?
  12. Manuel Conde Vendrell 2014-07-17 Well, it's supposed that any XML without TSS is valid (the "no use" of TSS is allowed, isn't) But any case it's easy to make an example: 1. Create new project: Basic Alloy 2. Go to index.tss and delete the "#label" reference 3. Close index.XML (so IDE can reload it in the next step) 4. Open index.XML: you have now the error there.
  13. Federico Casali 2014-07-17 Manuel, the fix was relative to the Alloy default templates, where the following code has been included:
        "#label": {
        	font: {
        		fontSize: 12
    In those cases, referencing the object by its ID won't show the warning. For now, if you create an object in the XML without referencing it from the Styles .tss, Studio is displaying a warning - in case you wanted to use the object ID also from the Styles .tss files. The code would be still valid, as you can use the ID just for referencing the object from the controller .JS files of course. You can disable all Alloy warnings from Studio from "Preferences->Studio->Validation" and disable "Alloy View Validator" option. We appreciate a lot your feedback. This item behavior is actually still under discussion internally and might be subject of changes (personally I see your point and would eventually either remove the warnings for ID objects not being referenced in the .TSS or give a specific option of hiding them).
  14. Manuel Conde Vendrell 2014-07-17 Federico, thank you very much for your comment, I will deactivate it with the option you shown me (I was looking for some option like that, but didn't find it). And personally I will set that option "deactivated by default", because it is very very common to call objects by id in the JS file, but do not have any specific style for it in TSS, so too much people will find this warnings.

JSON Source