Officers were called to the Safeway at 1421 Tara Hills Drive at 5:35 p.m.
A store employee told police that a man had approached a cashier at a check stand and said he had a gun and "wanted all the money," police Cmdr. Peter Janke said.
But police said that before the cashier could hand the suspect any cash, the man said he was "just kidding" and left the check stand line.
The suspect began to walk out of the store as officers arrived, and was immediately taken into custody without incident.
The man, identified as 50-year-old Arthur Fedelin, of Pinole, was arrested on suspicion of attempted armed robbery and was taken to county jail in Martinez.
No one was injured, and no money was taken.