To state the obvious, a society where children are shooting at each other is a society that is thoroughly broken.
In many places in Africa, the state is too weak or virtually non-existent. So, armed gangs of thugs arise to fill the void - to extract wealth from mines and oil wells, to enslave, plunder, pillage, rape, burn, loot, etc.
The way to stop this would be for the government to confiscate all the guns from the gangs, install a proper police force, and try the thuggish recruiters of child soldiers for war crimes. If the state can't or won't, then the conflict continues.