titanium alloy framework build error

50 Views Asked by At

it gives me an error of "Cannot call method createimageview of undefined file"

var imgpldt= Ti.Ui.createImageView({
image: "sponsors/Home DSL.png"
});

$.pldt.add(imgpldt);

heres the xml:

<Alloy>
<ScrollView class="container vertical whitebg actionBarTop">
    <View class="sponsorWrapper blackbg vertical">
        <View class="sponsorLogo" id='pldt'/>
        <View class="whitebg socialContainer">
            <View class="socialWrapper horizontal whitebg">
                <ImageView class="top10" id='pldtFB' image="/facebook.png"/>
            </View>
        </View>
    </View>
</ScrollView>
</Alloy>
1

There are 1 best solutions below

1
On BEST ANSWER

Arkaem,

You have done very small mistake, Ui change it to UI as below and then test it.

var imgpldt= Ti.UI.createImageView({
 image: "sponsors/Home DSL.png"
});