Arduino IDE 2 getting ResolveLibrary(util/delay.h) error

I added this library GitHub - tejashwikalptaru/ssd1306xled: SSD1306, SSD1315 and SSH1106 OLED screen driver (Windows 10 pro) and got the compile error

Using board 'seeed_XIAO_m0' from platform in folder: C:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1
Using core 'arduino' from platform in folder: C:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1
Detecting libraries used...
"C:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__="""LCD_only.ino"""" -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SEEED_XIAO_M0 -DARDUINO_ARCH_SAMD -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER="Seeed"" "-DUSB_PRODUCT="Seeed XIAO M0"" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER="Seeed"" "-DUSB_PRODUCT="Seeed XIAO M0"" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.4.0/CMSIS/Core/Include/" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.4.0/CMSIS/DSP/Include/" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS-Atmel\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\variants\XIAO_m0" "C:\Users\NATHAN~1\AppData\Local\Temp\arduino-sketch-F01CA700E199CB2575C855547F5046EF\sketch\LCD_only.ino.cpp" -o nul
Alternatives for ssd1306xled.h: [ssd1306xled@0.0.1]
ResolveLibrary(ssd1306xled.h)
-> candidates: [ssd1306xled@0.0.1]
"C:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__="""LCD_only.ino"""" -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SEEED_XIAO_M0 -DARDUINO_ARCH_SAMD -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER="Seeed"" "-DUSB_PRODUCT="Seeed XIAO M0"" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER="Seeed"" "-DUSB_PRODUCT="Seeed XIAO M0"" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.4.0/CMSIS/Core/Include/" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.4.0/CMSIS/DSP/Include/" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS-Atmel\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\cores\arduino" "-IC:\Users\Nathaniel\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.1\variants\XIAO_m0" "-Ic:\Users\Nathaniel\Documents\Arduino\libraries\ssd1306xled" "C:\Users\NATHAN~1\AppData\Local\Temp\arduino-sketch-F01CA700E199CB2575C855547F5046EF\sketch\LCD_only.ino.cpp" -o nul
Alternatives for util/delay.h:
ResolveLibrary(util/delay.h)
-> candidates:
Using library ssd1306xled at version 0.0.1 in folder: c:\Users\Nathaniel\Documents\Arduino\libraries\ssd1306xled
Compilation error: Error: 2 UNKNOWN: exit status 1

I found this related post util/delay.h compiler problem -- is there a workaround to this util/delay.h problem?

Not using the library compiles the code without error

That post is completely irrelevant

This one gives the answer:
https://forum.arduino.cc/t/util-delay-h-no-such-file-or-directory/553923

util/delay.h is part of avr-libc, which is a library of code for microcontrollers of the AVR architecture. Any library which uses util/delay.h is only compatible with Arduino boards that use an AVR microcontroller. But you are using the Seeed XIAO, which uses a different microcontroller.

So you won't be able to use this ssd1306xled library. I recommend looking around for other library options. I have seen quite a few libraries for the SSD1306 and I'm certain they offer a wider range of compatibility. You can check the Arduino Library Manager, which can be opened via the IDE's Sketch > Include Library > Manage Libraries... menu.

Thank you for pointing out that my seeeduino XIAO will not support cord out of the avr library. This is very helpful to know.

I ended up using this library GitHub - bitbank2/OneBitDisplay: A full featured Arduino display library for 1-bit per pixel OLED and LCD displays that supports my SSH1106 display, and finally got it to work.

I'm very glad to hear you got it working. Thanks for taking the time to share your findings!
Regards, Per