Try this :
01. Use PC and card reader .......and quick format at 32KB file allocation for up to 32GB card, if 64GB card use 128KB file allocation size.
02. Put memory card in GP. Do DELETE ALL/FORMAT again in GP.
If all the time SD error, it can only mean 3 things :
A. The card reader mechanism in the GP cam is faulty
B. The camera has problem
C. Your card is defective <<< this you can verify using card reader on a PC.
Beware, defective microSD card is no un-common and if the defective condition is a short circuit, your camera can get fried.
I got once a defective Sandisk Ultra which became hot when inserted into GP cam, in mere seconds. Lucky I detected fast. The card was short circuited one.
A Sandisk Extreme also fried a friend's GP cam when it is is shorted.
MicroSD card in a GoPro is the hottest any memory card can be, it can hit 68C ...., which 68C is the auto cut off thermal protection of a GoPro, if you are using ORIGINAL GoPro battery. Do not use 3rd party battery, as the temperature sensing chip is not available in 3rd party battery. GP cam's battery has 3 pins, one of them is for the temperature trigger to camera motherboard.
Good luck......