If all LEDs are flashing or if the first and last LED are flashing, this could indicate that the battery has overheated.
Allow your battery to cool before attempting to charge or use it in a tool. (Cooling could take between 15-20 minutes, depending on the battery or ambient temperature).
Overcurrent protection
If the inner two LEDs are flashing, the battery may have engaged the overcurrent protection.
This occurs when too much demand is put on the battery. Overcurrent protection prevents the battery from powering the tool in order to limit any potential damage that may happen to either the tool or battery.
If this happens, remove the battery from the tool and wait 10 seconds before re-inserting it.