China threatened on Saturday to take “resolute countermeasures” against a $2 billion sale of arms by the United States to Taiwan.