Abstract Spotted wing drosophila, Drosophila suzukii, has become a major pest of soft‐skinned fruit crops in the Americas, Europe and North Africa. In many regions, D. suzukii management is complicated by the fly's ability to persist on non‐crop hosts and then invade or reinvade crop fields from surrounding natural habitats. In California, non‐crop habitats adjacent to commercial cane berry fields often contain wild blackberry (Rubus spp.), a potential overwintering host for D. suzukii. We sampled D. suzukii and its naturally occurring parasitoids (the pupal parasitoids Trichopria drosophilae and Pachycrepoideus vindemmiae) in commercial berry fields and adjacent non‐crop habitat throughout the year, to determine whether non‐crop habitat is a seasonal or year‐round refuge for D. suzukii, and whether numbers of D. suzukii and its parasitoids in berry fields are dependent on the composition of the surrounding landscape. Numbers of D. suzukii adults were consistently higher in non‐crop habitat, and proportions of female D. suzukii were highest in berry fields, indicating that females dispersed more widely than males. The effect of habitat diversity on numbers of D. suzukii adults was positive in fall and negative in early spring, possibly reflecting differing habitat requirements of D. suzukii over time. Parasitoid numbers were also higher in non‐crop habitat and were positively affected by proportions of non‐crop habitat and cropland in summer. Results indicate that non‐crop habitats were a year‐round refuge for both D. suzukii adults and its parasitoids, and that landscape effects on D. suzukii abundance in crop fields can change over the seasons.