This is a very common issue with the Arduino IDE 2.x when switching boards, updating cores, or modifying libraries!

The error: `AP.cpp.o) in archive is not an object` means that the compiled cache file for the ESP32 `WiFi` library got corrupted on your computer. It has nothing to do with your code itself.

To fix this, you just need to force the IDE to rebuild the library from scratch. Here are the two ways to fix it:

### The Easy Fix (Recommended)
1. In the Arduino IDE, go to **Sketch > Verify/Compile** but hold down the **Shift** key on your keyboard while clicking it.
2. (Or, in some newer IDE versions, go to **Sketch > Clean**).

*This forces the IDE to ignore the cached/corrupt files and recompile everything from the ground up.*

### If the Easy Fix doesn't work (Manual Cache Clear)
1. Close the Arduino IDE completely.
2. Open Windows File Explorer and navigate to exactly this folder:
   `C:\Users\giorg\AppData\Local\arduino\sketches\`
3. Inside, you will see a folder named `B82AD196A74886C488B56C6990F60DDA` (this is your corrupted build cache).
4. **Delete that entire `B82AD196A74886C488B56C6990F60DDA` folder.**
5. Reopen Arduino IDE and click **Upload** again.

Once you force it to recompile the `WiFi` library correctly, your code will flash successfully!
