Tensions between the United States and China flared on two military fronts as Washington accused the Chinese of harassing American pilots flying over the African nation of Djibouti and warned of consequences to the deployment of missiles on artificial islands China has built in disputed waters in the South China Sea.