In the Alien movies, I have never recalled seeing an Android's hair growing longer. But in Alien: Covenant (2017), David was cutting his hair.
Does anyone have an explanation?
Most Alien movies are set over a number of days, whereas the time difference between Prometheus and Alien: Covenant is years. The fact that David has to cut his hair is proof alone that yes, David's hair does grow over time.
It's probably worth noting that this doesn't mean that all androids have hair that grows. It is specifically pointed out in Alien: Covenant that Walter and David, while seemingly identical on the surface, are actually very different models of android, with Walter having been "downgraded" in some areas to make people more comfortable around him. For all we know, hair growth is something that was stripped from the later models of android.