AbstractAdaptation to divergent environments can result in ecological specialization. The detection of trade-offs across environments (i.e., negative correlations in performance between different environments) is the hallmark of specialization. Although such trade-offs are predicted by theory, experimental evidence that trade-offs can readily evolve in the laboratory remains scarce. Here, we investigated the evolution of adaptation to distinct environments, including potential fitness trade-offs by maintaining populations of the generalist fruit pest, Drosophila suzukii, for 26 generations on media made with different fruits. We measured the performance and preference of each evolved population on the different fruits using reciprocal transplant experiments after five generations and at the end of our experiment. After five generations, experimental populations on most fruits had gone extinct, but they had adapted to three test fruit media, without exhibiting trade-offs. By generation 26 on these three fruits, specific adaptation to each fruit media had evolved, with trade-offs across media for some populations. The evolution of fruit-specific performance did not drive the evolution of corresponding preferences (i.e., preferences for the evolution fruit). This study suggests that ecological specialization can evolve in generalist species, even if only transiently, when hosts or habitats are heterogeneous over time and space.