It is a consequence of Sullivan's work <cite authors="Sullivan, D.">_Sullivan, D._, Combinatorial invariants of analytic spaces, Proc. Liverpool Singularities-Sympos. I, Dept. Pure Math. Univ. Liverpool 1969-1970, Lect. Notes Math. 192, 165-168 (1971). [ZBL0227.32005](https://zbmath.org/?q=an:0227.32005).</cite> that every compact real-analytic subset $V\subset {\mathbb R}^n$ is a mod 2 pseudo-manifold, hence, has a ${\mathbb Z}_2$-fundamental class, hence, has nonzero $H_k(V, {\mathbb Z}_2)$, $k=\dim(V)$. In particular, $V$ cannot be contractible. Sullivan's paper is freely available [here](https://www.math.stonybrook.edu/~dennis/publications/PDF/DS-pub-0007.pdf).