Serena Williams cited a knee injury behind her decision to withdraw from a doubles match at Wimbledon.