Abstract: | Populations vary in their degree of ecological specialization. An intuitive, but often untested, hypothesis is that populations evolving under greater environmental heterogeneity will evolve to be less specialized. How important is environmental heterogeneity in explaining among‐population variation in specialization? We assessed juvenile viability of 20 Drosophila melanogaster populations evolving under one of four regimes: (1) a salt‐enriched environment, (2) a cadmium‐enriched environment, (3) a temporally varying environment, and (4) a spatially varying environment. Juvenile viability was tested in both the original selective environments and a set of novel environments. In both the original and novel environments, populations from the constant cadmium regime had the lowest average viability and the highest variance in viability across environments but populations from the other three regimes were similar. Our results suggest that variation in specialization among these populations is most simply explained as a pleiotropic by‐product of adaptation to specific environments rather than resulting from a history of exposure to environmental heterogeneity. |