Safe fix for Mac (Android studio 4.1+). After Mac gets updated, we need to create a symbolic link to Android Studio.
Just run in the Terminal this command
$ ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
To fix this issue, try running the following command on Mac
$ brew reinstall cocoapods