Arduino Wifi Rev 2 not working with RFID library

Hello,
I’ve got a weird issue that I can’t fix. I’ve got an Arduino wifi Rev 2 and I can’t use the RFID library with it. The Arduino wifi is working and I have uploaded other codes on it (like blink works).

Basically, as soon as I type “#include <MFRC522.h>” in a new sketch I can’t compile it. The weird thing is if I switch the board (in the Tools menu) to like a Mega it compiles just fine.

I get a warning which states:
WARNING: library rfid claims to run on avr, STM32F1, teensy architecture(s) and may be incompatible with your current board which runs on megaavr architecture(s).

Is this the problem? If it is what should I do?

Thanks

The answer was right in front of you.

WARNING: library rfid claims to run on avr, STM32F1, teensy architecture(s) and may be incompatible with your current board which runs on megaavr architecture(s).

There are many libraries that are only suitable for specific MCU's and this appears to be one of them.
You could do one of three things.

Ask the person whose library it is to make it compliant with your hardware
Make the library compliant yourself if you have the skills.
Try a different library after checking it has compatibility.

Could you also take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.