Failed to execute new( params ) function on 'Menu_View'.

Hi, I tried testing my app on my device and got this error
Director ERROR: Failed to execute new( params ) function on ‘Menu_View’.
My app works perfectly fine on the simulator, but gives me the error on the device. Here is my “Menu_View.lua” file…
[lua]module(…, package.seeall)

function new()
local menuGroup = display.newGroup()
local _W = 640
local _H = 960
local Listener

local drawScreen = function()

– Group_1 positioning
local Group_1 = display.newImageRect( imgDir… “p1_group_1.png”, 323, 503 );
Group_1.x = 159; Group_1.y = 228; menuGroup:insert(Group_1); Layer_1 = nil

– Layer_2 positioning
local Layer_2 = display.newImageRect( imgDir… “p1_layer_2.png”, 80, 82 );
Layer_2.x = 46; Layer_2.y = 82; menuGroup:insert(Layer_2); menuGroup.Layer_2 = Layer_2 ; Layer_2 = nil

– Layer_3 positioning
local Layer_3 = display.newImageRect( imgDir… “p1_layer_3.png”, 80, 80 );
Layer_3.x = 160; Layer_3.y = 84; menuGroup:insert(Layer_3); menuGroup.Layer_3 = Layer_3 ; Layer_3 = nil

– Layer_4 positioning
local Layer_4 = display.newImageRect( imgDir… “p1_layer_4.png”, 80, 80 );
Layer_4.x = 274; Layer_4.y = 83; menuGroup:insert(Layer_4); menuGroup.Layer_4 = Layer_4 ; Layer_4 = nil

– Layer_5 positioning
local Layer_5 = display.newImageRect( imgDir… “p1_layer_5.png”, 77, 77 );
Layer_5.x = 44; Layer_5.y = 191; menuGroup:insert(Layer_5); menuGroup.Layer_5 = Layer_5 ; Layer_5 = nil

– Layer_6 positioning
local Layer_6 = display.newImageRect( imgDir… “p1_layer_6.png”, 81, 81 );
Layer_6.x = 160; Layer_6.y = 194; menuGroup:insert(Layer_6); menuGroup.Layer_6 = Layer_6 ; Layer_6 = nil

– Layer_7 positioning
local Layer_7 = display.newImageRect( imgDir… “p1_layer_7.png”, 83, 83 );
Layer_7.x = 272; Layer_7.y = 196; menuGroup:insert(Layer_7); menuGroup.Layer_7 = Layer_7 ; Layer_7 = nil

– Layer_8 positioning
local Layer_8 = display.newImageRect( imgDir… “p1_layer_8.png”, 121, 58 );
Layer_8.x = 70; Layer_8.y = 296; menuGroup:insert(Layer_8); Layer_8 = nil

– Layer_9 positioning
local Layer_9 = display.newImageRect( imgDir… “p1_layer_9.png”, 113, 46 );
Layer_9.x = 253; Layer_9.y = 300; menuGroup:insert(Layer_9); Layer_9 = nil

local function onIconClick(event)
if event.phase == “ended” or event.phase == “cancelled” then
if event.target == menuGroup.Layer_2 then
print(“2”)
disposeTweens()
director:changeScene(“Pages.Bus_View”,“moveFromRight”)
end
if event.target == menuGroup.Layer_3 then
print(“3”)
disposeTweens()
director:changeScene(“Pages.Map_View”,“moveFromRight”)
end
if event.target == menuGroup.Layer_4 then
print(“4”)
disposeTweens()
director:changeScene(“Pages.Directory_View”,“moveFromRight”)
end
if event.target == menuGroup.Layer_5 then
print(“5”)

end
if event.target == menuGroup.Layer_6 then
print(“6”)

end
if event.target == menuGroup.Layer_7 then
print(“7”)
disposeTweens()
director:changeScene(“Pages.Calander_View”,“moveFromRight”)
end
end
return true
end

function Listener(flag)
if flag then
menuGroup.Layer_2:addEventListener(“touch”,onIconClick)
menuGroup.Layer_3:addEventListener(“touch”,onIconClick)
menuGroup.Layer_4:addEventListener(“touch”,onIconClick)
menuGroup.Layer_5:addEventListener(“touch”,onIconClick)
menuGroup.Layer_6:addEventListener(“touch”,onIconClick)
menuGroup.Layer_7:addEventListener(“touch”,onIconClick)
else
menuGroup.Layer_2:removeEventListener(“touch”,onIconClick)
menuGroup.Layer_3:removeEventListener(“touch”,onIconClick)
menuGroup.Layer_4:removeEventListener(“touch”,onIconClick)
menuGroup.Layer_5:removeEventListener(“touch”,onIconClick)
menuGroup.Layer_6:removeEventListener(“touch”,onIconClick)
menuGroup.Layer_7:removeEventListener(“touch”,onIconClick)
end
return true
end

–//
Listener(true)

end
drawScreen()

function clean()
Listener(false)
Listener = nil
end

return menuGroup
end
[import]uid: 132369 topic_id: 35566 reply_id: 335566[/import]