China demanded the United States “dispel obstacles” to improving military ties and stop slandering it, amid growing tensions over trade, Taiwan, the South China Sea and President Donald Trump’s claims of China meddling in the upcoming US election.