The evil empire discovers too late that Troperians happen to be immune to their weaponry, either through some freak mutation or magic makes their weaponry not work.
If the Empire cut loose with everything it had, it could win easily by levelling everything. Fortunately for the natives, it wants to capture Troperia intact for use and doesn't have terraforming technology, so nuking it to the bedrock and restoring it afterwards is impractical. Therefore, they must rely on vulnerable boots on the ground.
Alternatively, the Empire's forces is led by their personal General BadTaktiks who knows jack about commanding troops; this allows Troperia's survival by virtue of superior strategy and tactics.
The Empire focused on protecting themselves from the wrong things - their flexible armor blocks lasers, bullets, shrapnel, and blades fine but offers little protection against blunt force.
Troperians are naturally extremely strong - their spears can be thrown with enough force to penetrate tank armor.
The invading force is at a distinct technological disadvantage.
It turns out that Troperia had some great technology of their own.
Troperia wins, but Foreshadowing throughout the work culminates in The Reveal that they did so only because a power on the Evil Empire's level is secretly backing them or hindering the Empire.
Troperia's ability to put into practice all those devices needed to fight the Empire betrays the fact that their tech is actually good, even if it's not applied the same way as the Empire.
Troperia beats the Empire... then it turns out that Those Were Only Their Scouts, deliberately underequipped and poorly-trained suicide legions meant to die en masse probing the enemy. Emperor Evulz decides it's time to Get Dangerous, sends in the elite troops with up-to-date gear, and promptly Curb Stomps the Troperians.
But while it's by no means old, it's still ancient compared to the Empire's brand-new machinery.
Troperia beats the Empire... then it turns out that Those Were Only Their Scouts. Emperor Evulz decides it's time to Get Dangerous, sends in the main army.... that are poorly trained, and with gear that makes the Troperians look advanced, and promptly gets Curb Stomped by the Troperians.
Parodied: The people of Troperia only fight with sticks and rocks - and beat the Empire in five minutes flat.
Troperia has some pretty good tech, but it's pretty crappy compared to what the Empire is packing. But then Troperia's top scientists unveil the newest Super Prototype.
Troperia is relatively "modern" in some levels but is technologically stunted in some others. The invasion causes Troperia to copy the Evil Empire's tech.
Averted: The more technologically-advanced side wins handily.
Enforced: "Alright, let's get cerebral with this one. Have the good guys win with strategy instead of superior firepower."
Lampshaded: "How are they winning?! They don't even know what a robot is!!!"
Invoked: The leader of Troperia gives a Rousing Speech to tell them not to give up right before the war.
Defied: "I'm sure their spirit is unsinkable and all that. But I don't care. Get more robots in there right now!"
Discussed: "How are we winning?" "We have weapons that won't jam or break, and they don't know how to fight once you break their pretty space swords!"
Conversed: "In a real war this wouldn't work... but these are the heroes defending their homeland, so of course a man with a rock can beat a soldier in futuristic space armor."
Troperia won the battle - but the numbers they lost aren't so easily replaced compared to the Empire, who can replace those soldiers at a moment's notice.
Troperia won the battle. The spiteful Empire, deciding that If I Can't Have You, then neither can they, decides to utterly level Troperia with scorched earth saturation artillery/aerial/orbital/kinetic bombardment. The Troperians can't do anything to save themselves because of their low tech.
However, Troperia made such an impression on the Empire that they don't try to invade again.
The Empire's technology is so ridiculously delicate and its soldiers so woefully incompetent that the Troperians treat their invasions more like pest control with a really big rock. The Empire also falls for the same primitive traps every single time.
A reverse Lensman Arms Race develops as both sides work their way down more primitive weapons to get an advantage.
Played For Drama: The work cuts between several perspectives: The Empire's troopers on the ground, who go from confident to jumping at shadows as the Troperians take their toll; General Ripper or Admiral I.N.Sane who grows increasingly frustrated with High Command's refusal to let him cut loose with the nukes; the frontline Troperians carrying out their ambushes; and Troperian High Command who while publicly celebrating every victory, privately fear that every win of theirs draws the Empire's patience thinner and fear what will happen once the Empire gets pushed too far.