This paper considers a scenario in which a solar-powered UAV travels in a dynamic urban environment with unknown static and moving obstacles. A framework is proposed, including a three-phase hybrid approach for this problem. Firstly, an energy-aware path planning algorithm is proposed based on the limited information of the environment. Secondly, a pure pursuit controller is applied to follow the pre-generated online path. Finally, an energy-aware reactive obstacle avoidance algorithm is used to avoid collision with unknown obstacles. The effectiveness of the proposed framework is verified based on computer simulation.