The Chinese foreign ministry said it would stop talking to America on issues ranging from climate change to military relations.