The No. 30-ranked Lopez was called in by Spain on Friday after Nadal was forced to pull out with an undisclosed injury.
Nadal, a record seven-time French Open champion, lost in the second round at Wimbledon last month and hasn't played since.
Nadal also was to be Spain's flag bearer for next Friday's opening ceremony at the London Games, but it wasn't immediately clear who would carry the flag in his place.
The Olympic tennis tournament will be played at Wimbledon from July 28-Aug. 5.