Chinese smartphone maker Xiaomi will build its first auto plant with an annual production capacity of 300,000 cars in Beijing for its electric vehicle (EV) unit.