By the late nineteenth century, the European powers had colonized a large portion of Africa. Some countries became part of the European world in their free will thinking that joining the European powers would bring much good to them. Although, those who did not have this way of thinking fought back and resisted the colonial move.
The Europeans had one significant advantage over the African tribes they encountered: superior weapons like the Maxim machine gun, which was a powerful semiautomatic rifle during those days. The primitive spears, bows and arrows of the tribes' men were nothing compared to the powerful European weapons. Although, as the news of the "white invaders" spread, African villages became more and more prepared for the battle against colonialism:
To protect his Mandinka Empire, Samori Toure had engaged a full-scale seven year battle with French. Although they weren't fit for a long-term war because eventually they ran out
of resources of food and gunpowder, unlike the European forces who were suited for long term battles.
Samori was not the only one who had resisted colonialism in Africa; Queen Mother Yaa Asatewa was a great women of the Asante who fought the British for fours years until she and her people were finally overpowered.
King Menelik II was the one of the few people who lead his people to victory. Italy suffered great losses after their defeat in the Battle of Adowa. Italy's defeat shocked all the European countries, but unfortunately the Europeans didn't stop trying to gain colonies elsewhere. So even after many battles and much resistance European conquest was more or less inevitable.
Not all African communities fought against the European powers; some of them willingly joined the powers thinking that it would bring them much good, like trading rights, a higher reputation, and...