I found an earlier appearance in the 1904 novel Beverly of Graustark by George Barr McCutcheon. This is on page 39:
Even the hills have eyes and ears.
The Oxford Dictionary of Proverbs has similar phrases going back a long way, but not "the hills have eyes" specifically.
"The fields have eyes and the woods have ears" is used by Chaucer in The Knight's Tale:
But sooth is seyd, go sithen many yeres
That "feeld hath eyen and the wode hath eres."
But the origin is older even than that. A thirteenth century manuscript in Trinity College, Cambridge has Veld haveð hege, and wade haveð heare with the Latin translation Campus habet lumen et habet nemus auris acumen. At about the same time, it appears in the work of the German poet Reinmar von Zweter: Walt hat oren, velt gesiht.
"The walls have ears" is traced to 1592 (G. Delamothe, French Alphabet ii. 29), linked to the French parallel Les murailles ont des aureilles. This may be the oldest form of all: it appears in the Vayikrah Rabbah (c. 5th-7th century) as