Treatment of solid polymer wetted by water or organic solvents