1 Some wild bees can persist in human-altered habitats in the face of global wild bee decline. To date, however, little is known about why those bees can tolerate human disturbances. Here we hypothesized that wild bees living in human-altered habitats could achieve their nesting resources and floral resources. Moreover, persistent provision of those resources could enhance their populations. 2 The foraging areas of solitary, cavity-nesting bees Anthophora waltoni were determined in two agricultural ecosystems with rich bee populations. The influences of seminatural habitats, nesting resources and farmlands on A. waltoni visit density were assessed by modelling bee density against landscape factors in 17 agricultural ecosystems. Moreover, temporal availabilities of those resources were measured across the last three decades. 3 A. waltoni used vetch fields and field margins, instead of seminatural habitats, as foraging areas. The area of brick walls and the area of farmlands, as well as their temporal increases, synergistically positively influenced A. waltoni visit density on vetch flowers. The percentage of buildings and farmlands increased across the last three decades in spite of a slowdown in 5-year growth of brick walls. 4 The results demonstrated the synergistically positive effects of nesting resources and floral resources, as well as persistent provisions of those resources, on A. waltoni populations in agricultural ecosystems. A. waltoni could live in the human-altered habitats because they persistently achieved their nesting resources and floral resources.