Apologies in advance that my bullet points got away from me and turned out a bit long, but I'm trying to give as much information as I can to ward off initial questions.
Imagine the following constraints:
An island nation laid out similarly to Hawaii, namely, a cluster of islands with one "dominant" island and 7 smaller ones, with distances varying between 8-50 miles between each island. It is also a volcanic island and with the same climate, meaning an abundance of rain forest, mountainous areas, and so on. (Though geographically the island in question is identical to Hawaii it is home to a few different animal and plant species for the purpose of storytelling.)
The island has no nearby neighbors, no landmasses in a radius of at least 1000 miles in any direction, and therefore has not in their history encountered anyone before.
The islanders are a "primitive" people with limited access to refined tools. Their total population numbers just under 100k, unified as one "tribe" or "kingdom" with a "king" ruling from the main island. They travel via canoe-like boats or rafts from island to island, but never really venture beyond, believing that where they could no longer see the ocean was where the universe ended. They have volcanic obsidian that they use by chipping off thin, glass-like pieces that they use for blades, spears, knives, jewelry, etc.
The islanders may have some agriculture and fish-farming, but their core culture is that of a hunter-gatherer or warrior culture, where those with the most kills are the strongest. The island is home to several species of big cat, deadly boa constrictors, sharks, and angry wild boars which are considered prize kills, and the islanders make a great show of their "warriors" by counting how many heads they have collected. Even the most peaceful farmer will be obligated to participate in one or two hunts to maintain his reputation, so there is no shortage of people trained to fight in this society.
The European world is right about in the 15th century as far as technology and culture goes. Countries have large seafaring ships which are exploring the globe, looking for resources and new land to colonize. Potential explorers are armed with cannons, rifles, pistols, and well-made blades.
Approximately 35 years ago a ship of indeterminate origin (full of Europeans of some nationality) landed on the island nation. By landed I mean crashed, their ship had been damaged by a storm and the crew was suffering from lack of food and dehydration, so they were unable to keep from hitting the shore. The natives took in the survivors (about 60-75 individuals out of a full crew of 180), nursed them back to health, and fed them. When the crew recovered, they found that the ship was irreparable, but they were able to salvage an enormous amount of non-food supplies during low-tide. Tools (repair tools, navigation tools, etc), rope, wood, cannons, gunpowder, rifles, pistols, armor, blades, etc, etc, anything that would be on an explorer's ship in the 15th century. For the purposes of this question assume that all of the supplies were intact and not ruined by salt-water or the crash. Luck, providence, or hand-wavery may be required.
The crew had been wildly off-course due to their looming starvation and illness spreading through the ship, so they had no idea where they were or how far away they were from home. Unable to contact anyone for help (and falling in love with the beautiful island they found themselves on), the crew members integrated themselves into the island society. They learned the native language, built themselves houses, and maybe even married a few local women and started families. In return, the islanders learned more about modern technologies and integrated the supplies they found. As a novelty people, the explorers would end up living in the "capital" village, or close to it, and may even have become friends with the King. The entire population would at least have seen them once or twice, or know of them via messages. A few of the population might have initially been resistant to the intruders, but since the sailors settle down and live a quiet, peaceful life in paradise, they are mostly left alone.
The next time that Europeans arrived, the situation was much different. About 30 years later, a group (from a different homeland than our original stranded crew) landed and proceeded to attempt to lay claim to the island for their home country. They were a small crew, however, only 150 men total, who assumed that the welcoming complement of 100 villagers was the total population. When the islanders learned they were under attack they were able to drive them off on land with sheer numbers, forcing them to leave. In the process though, the islanders lost people, both those who were killed by the invaders, and those that were enslaved and kidnapped from the island.
Since then, the islanders have become terrified that they might be under attack again. Paranoia passed through the population, and they began to realize that they may have to defend their island paradise against invaders by sea.
They have (though they don't know it) at least 5 more years before the next group of hostile Europeans comes back. The same explorer will return, with at least 5 fully manned 30 gun frigates (with a crew of ~200 men apiece), who will be fully stocked with all the weaponry needed for a fight on the water or on land.
How does my island nation prepare for this onslaught? Assuming that the surviving crew members (who would be senior citizens at this point if they are still alive) are able to inform them of how many people will be on each warship and about how many warships a country might send, what is their best option? You have all the supplies and resources of the island nation, and whatever equipment is leftover from the ship salvage 35 years ago.
I would like answers to use historical evidence (ie. how have technologically inferior people protected themselves against a technologically superior force in our history?).
I'm aware that no nation thus far has been able to fight off a technologically superior force so far in our world, so there may have to be some crazy luck or circumstance involved in your answer, and that is acceptable. Even if the chances of success are tiny, there must be some way that this island nation can keep themselves from being genocidally murdered.