ERROR MESSAGE

please help me how to correct this error in this message. am a student.

Arduino: 1.8.7 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 1188 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't set com-state for "\.\COM22"
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

If your arduino is really on COM22, then you probably need to reboot your PC. I have had experiences when the COM ports get "stuck" and the PC needs to reboot in order to fix it.

If, when you plug in your Uno, a different port appears on the IDE, then you just need to select the correct COM port before compiling/uploading.