Here are a few examples of reports of the compiler in IDE 2.x doing the same thing - I.e.choosing the wrong BLE library.
Ptillisch has responded to some of these with 2 solutions.
Solution 1, deleting the library you don’t want, isn’t possible in Cloud Editor.
Solution 2, adding an extra #include, doesn’t work in the Cloud Editor (I believe it’s because of the old core & boards version it’s using).
Ble will not compile Post 6.
'startAdvertising' is not a member of 'BLEDevice - #5 by ptillisch Post 5.