The Brits, Spaniards and French didn't invade, they established colonies. These colonies actively engaged in trade and defense agreements with various native American tribes. At various times different tribes were aligned with one European nation or another, with the most famous example being the French and Indian War, with the Iroquois and Cherokee allying with the British and the Wabanaki, Abenaki, Shawnee, etc allying with the French.
Native American tribes and nations had deep seated rivalries and disputes going back centuries (just as the Europeans did), so there never was any kind of single unified America until the U.S. expanded across the continent.
Notably the British did not succeed in the War of Independence or the War of 1812, despite having a superior military and navy.
FWIW, the U.S. would be incredibly hard to invade. It does have a number of geographic advantages that no other country can match (not least of which is the Mississippi River system).
Even Pearl Harbor was a hit and run attack. No Japanese troops ever touched shore.