The Chinese government said the economy slowed in the final quarter due to President Donald Trump's trade war, but still grew at a solid 5.2%.
That was down from the 5.4% annual growth in January to March.
In the first half of the year, China's economy grew at an annual rate of 5.3%. However, some analysts believe real growth is likely to be slower.
Zichun Huang of Capital Economics said fixed-asset investment rose 2.8% in the first half of the year, with growth of 2.9% in May and just 0.5% in June.
Meanwhile, China also reported that its exports jumped 5.8% in June from a year earlier, up from 4.8% in May.
The suspension of high tariffs on Chinese exports to the United States has spurred a surge in orders from companies and consumers as trade talks resume.
Chinese companies are also expanding exports and offshore production in other countries to offset the impact of higher tariffs imposed by the Trump administration.