Please note that according to the documentation lib_extra_dirs is deprecated since version 6.0 and the use of Local Folder and “Symbolic Link” feature is recommended.
By using symlink, the resolving of dependent libraries is performed without any problems.
Example
File and folder structure:
.
├── libraries
│ └── LibA
│ ├── src
│ │ ├── LibA.cpp
│ │ └── LibA.h
│ └── library.json
└── projects
└── projectA
├── include
├── lib
├── src
│ └── main.cpp
├── test
└── platformio.ini
LibA/library.json
{
"name" : "LibA",
"version" : "1.0.0",
"dependencies" : {
"bblanchon/ArduinoJson" : "^7.0.0"
}
}
projectA/platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
LibA = symlink://../../libraries/LibA
Output of pio run:
Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
--------------------------------------------------------------------------------
Library Manager: Installing symlink://../../libraries/LibA
Library Manager: LibA@1.0.0 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing bblanchon/ArduinoJson @ ^7.0.0
Unpacking [####################################] 100%
Library Manager: ArduinoJson@7.0.4 has been installed!