Platform not supported Error when using ESPAsyncWebServer for ESP32

In a nutshell, CMakeLists.txt for Arduino framework doesn’t contain required CPPDEFINES. Try adding -D ESP32 to your platfromio.ini:

platform = espressif32
framework = arduino, espidf
board = esp32dev
build_flags = 
    -D ESP32
1 Like