WASHINGTON — In an effort to spur lackluster sales of electric cars, California, New York and six other states said on Thursday that they would work jointly to adopt a range of measures, including encouraging more charging stations and changing building codes, to make it easier to own an electric car.

The goal, they said, was to achieve sales of at least 3.3 million vehicles that did not have any emissions by 2025.

The states, which represent more than a quarter of the national car market, said they would seek to develop charging stations that all took the same form of payment, simplify rules for installing chargers and set building codes and other regulations to require the stations at workplaces, multifamily residences and at other places.

They said they would also promote hydrogen fueling stations, presuming that fuel-cell cars become more widely available. And they said they would promote “time of use” electric rates that would allow charging at off-peak prices, and expand incentives like high-occupancy lane access and reduced tolls and preferential parking. The states also said they would buy electric cars for their own fleets, and in some cases encourage their municipalities to do the same.