MQTT.h: No such file or directory

Here is the program:

I downloaded the libraries:

C:\Users\Adam\Documents\Arduino\ESP-MQTT-AWS-IoT-Core-master\ESP-MQTT-AWS-IoT-Core-master\Arduino\MQTT\MQTT.ino:9:18: fatal error: MQTT.h: No such file or directory

 #include <MQTT.h>

                  ^

compilation terminated.

exit status 1
Error compiling for board NodeMCU 0.9 (ESP-12 Module).

What am I missing?

How to install libraries properly.

So I just have to rename them without dashes, ok.

That tutorial is very outdated. Support for dashes in folder names was added years ago. I noticed some other problems with that tutorial too. Usually the Adafruit documentation is of higher quality. I prefer the official Arduino guide:
https://www.arduino.cc/en/guide/libraries

The error you got has nothing to do with dashes in the folder names. It means that the Arduino IDE could not find the file MQTT.h in any of your installed libraries. From your screenshot, it seems that you expect the library in the arduino-mqtt-master folder to provide that file. Please provide a screenshot or directory listing that shows the contents of the arduino-mqtt-master folder and its src subfolder, if it has one.

Here are the libraries (I didn't change them):

PubSubClient https://github.com/knolleary/pubsubclient communication (choose 1)

ArduinoJSON GitHub - bblanchon/ArduinoJson: 📟 JSON library for Arduino and embedded C++. Simple and efficient.

Arduino MQTT https://github.com/256dpi/arduino-mqtt communication (choose 1)

However, says in the readme, "use PlatformIO and it will take care of installing" them. But I don't know how to use PlatformIO or why it should be used.

Please verify that File > Preferences > Sketchbook location in the Arduino IDE is set to C:\Users\Adam\Documents\Arduino.

If it's already set to that, please post a screenshot of the contents of C:\Users\Adam\Documents\Arduino\libraries\arduino-mqtt-master. Your screenshot above only shows the contents of its src subfolder.

adamaero:
Here are the libraries (I didn't change them):

PubSubClient https://github.com/knolleary/pubsubclient communication (choose 1)

ArduinoJSON GitHub - bblanchon/ArduinoJson: 📟 JSON library for Arduino and embedded C++. Simple and efficient.

Arduino MQTT https://github.com/256dpi/arduino-mqtt communication (choose 1)

The only one you need to think about is arduino-mqtt. That's the library that contains MQTT.h.

adamaero:
However, says in the readme, "use PlatformIO and it will take care of installing" them. But I don't know how to use PlatformIO or why it should be used.

Don't worry about that. PlatformIO is an alternative to the Arduino IDE, for advanced users.

Nothing was changed from GitHub:

Maybe something's in the wrong place:

It's really difficult for me to get an idea of your folder structure from these screenshots because Windows Explorer is horrible.

This is how the folder structure must be:

C:\Users\Adam\Documents\Arduino
|_libraries
|_arduino-mqtt-master
|_library.properties
|_src, etc.

Is that the folder structure you have?

Note that the library must be directly under C:\Users\Adam\Documents\Arduino\libraries\arduino-mqtt-master. It can't be in a subfolder like this:

C:\Users\Adam\Documents\Arduino
|_libraries
|_arduino-mqtt-master
|_arduino-mqtt-master
|_library.properties
|_src, etc.

That was it (from #4). Thank you very much.

Ah, I see it now in the screenshot of #4. I use Windows mainly but I've managed to beat my Windows Explorer into a semi-acceptable form from the terrible default settings through hours of struggle and registry hacks so I'm not used to deciphering useful information from the stock Explorer's nightmare interface.