Bugs is right. If $G$ is locally compact abelian and multiplication by $2$ (or squaring) is an automorphism of $G$, then $H^2(G,U(1))$ is isomorphic to the group of alternating bi-characters $G\times G\to U(1)$. This is discussed, for example, in Mumford's Tata Lectures on Theta III, and in my paper Locally Compact Abelian Groups with Symplectic Self-duality.
This points to a nice criterion for the vanishing of $H^2$ in this case, namely, $G$ should not admit non-trivial alternating bicharacters($\mathbf . $\mathbf R$ satisfies this condition)condition. So do all groups which have dense locally cyclic subgroups (see Section 5 of my article).

