Man accused of trying to lure a child