This paper proposes a two-stage framework for developing hybrid approaches to solve the three printed circuit board assembly (PCBA) problems, component sequencing problem (CSP), feeder assignment problem (FAP), and nozzle assignment problem (NAP), simultaneously for a multi-head gantry SMT (surface-mounting technology) machine. The three essential PCBA problems affect the productivity of a multi-head gantry SMT machine considerably. However, due to the difficulty and complexity, the NAP (which assigns a given set of nozzles to the assembly heads of a machine) has been often neglected or roughly resolved in past research. The lack of considering the NAP leads to the underestimation of the total assembly time required for one printed circuit board (PCB) and eventually results in inaccurate production planning. The two-stage framework consists of metaheuristic and dynamic programming (DP) methods, which can deal with the three PCBA problems systematically. Various metaheuristics including firefly algorithm (FA), improved FA (IFA), genetic algorithm (GA), particle swarm optimization (PSO), and whale optimization algorithm (WOA) have been respectively used in this framework and experiments have been conducted to investigate their effectiveness. The results show that the hybridization of IFA with DP outperforms the others in terms of total assembly time.