In this paper, a hierarchical framework for task assignment and path planning of multiple unmanned aerial vehicles (UAVs) in a dynamic environment is presented. For multi-agent scenarios in dynamic environments, a candidate algorithm should be able to replan for a new path to perform the updated tasks without any collision with obstacles or other agents during the mission. In this paper, we propose an intersection-based algorithm for path generation and a negotiation-based algorithm for task assignment since these algorithms are able to generate admissible paths at a smaller computing cost. The path planning algorithm is also augmented with a potential field-based trajectory replanner, which solves for a detouring trajectory around other agents or pop-up obstacles. For validation, test scenarios for multiple UAVs to perform cooperative missions in dynamic environments are considered. The proposed algorithms are implemented on a fixed-wing UAVs testbed in outdoor environment and showed satisfactory performance to accomplish the mission in the presence of static and pop-up obstacles and other agents.