Although the real estate market has softened in recent months, many New Yorkers have found it difficult or impossible to find homes within their means. Mr. de Blasio, a Democrat, made affordable housing a centerpiece of his administration — even before he took office in 2014 — pledging to build or preserve 200,000 units over the next decade.

Over the past three years, the capital funding for the city’s housing agency has doubled, rising to $798 million this year, from $400 million in 2014.

But affordable housing remains a challenge, given the city’s increasing population, the demand for housing at all income levels and a wave of luxury development that has washed over nearly every neighborhood in the city. And the administration has had little success in reducing the city’s homeless population, which climbed above 60,000 people last year.

The administration has smarted from claims by advocates for low-income housing that too many apartments are being given to moderate-income New Yorkers, rather than to the truly poor, who still make up a sizable portion of the population.

In response, the de Blasio administration has increasingly sought to earmark more affordable apartments for New Yorkers with what are called very low and extremely low incomes. About one-fifth of the apartments — far above the 8 percent goal set in the city’s housing plan — built or preserved in 2016 were for those earning less than $25,000.