No. A 1-gallon tank is far too small.
Why
Hermit crabs need room to roam, stable humidity, and proper temperature. A cramped tank causes stress and illness.
Recommendation
A minimum of 10 gallons is advised for one crab, with at least 5 gallons per additional crab.
Bigger is always better.