I've got a Lua function Button
, which creates a button, add it to the layout and returns the button. Then I want to add to it ClickListener
local button = Button ("text", MATCH_PARENT, WRAP_CONTENT)
button: setOnClickListener (luajava.createProxy ("android.view.View.OnClickListener", {
onClick = function (e)
print ("clicked")
end
}
))
But the answer is just that:
Runtime error: java.lang.NoClassDefFoundError: android / view / View / OnClickListener
stack trackback:
[C]: in function 'createProxy'
...
P.S. Sorry for my english