attempt to call met hod 'setFillColor' (a nil value)

Why is this code gives me an error? it’s straight from documentation http://docs.coronalabs.com/api/library/display/newText.html

    local myText = display.newText( "Hello World!", 100, 200, native.systemFont, 16 )     myText:setFillColor( 1, 0, 0 )  

attempt to call met hod 'setFillColor' (a nil value)  

Are you using pre-graphics V2 build? If so, you should use setTextColor, as advised in the setFillColor documentation:

“In builds based on V1 Graphics, continue using setTextColor() to set the fill color for text objects created via display.newText().”

Are you using pre-graphics V2 build? If so, you should use setTextColor, as advised in the setFillColor documentation:

“In builds based on V1 Graphics, continue using setTextColor() to set the fill color for text objects created via display.newText().”