Crustacean

Most crustaceans breathe using gills, however, some species have developed primitive lungs.

An excerpt from the article 22 facts about crustacean

Lungs are found in crabs Chasmagnathus granulatus and hermit crabs Coenobita and Birgus. They are made of similar tissues as gills but are more adapted to breathing atmospheric air. Terrestrial hermit crabs have gills in addition to lungs, but they are too inefficient to allow them to breathe underwater so these crabs can easily drown even in shallow water.