If that's your definition of a lifespan, "max 2 years" is absolutely not true. Android has two types of support: new major releases and security patches.
An average Android usually supports new major Android releases for 2 years, but security patches usually go longer. Not as long as an iPhone, but more like 3-5 years.