Assessing the roles of mechanical cracks in Ni-rich layered cathodes in the capacity decay of liquid and solid-state batteries.