Back

titanium中不要使用数字作为xml的element id ( don not use number as xml element id )

发布时间: 2014-12-24 08:12:00

如题。

否则会引起莫名其妙的报错。

例如,一旦把下面第三行的l 变成  数字1,就无法通过编译:

<Alloy>
<Window>
<ImageView id="imageView" onClick="clickImage"/>
<Label id="l">Click Image of Apple Logo</Label>
</Window>
</Alloy>

Back