How do add Android Studio shortcut to favorites in the Show Applications Menu in Ubuntu

I wanted to add Android Studio to Favorite in left Applications Menu, but it was not possible. After a short search i have found a way:

1. create a shortcut under ~/.local/share/applications:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/android-studio/bin/studio.sh
Name=Android Studio
Comment=Android Studio
Icon=/opt/android-studio/bin/studio.png

2. click left bottom on Applications Menu „Show Applications“ icon

3. search for „Android Studio“, click with right mouse button and select „Add to Favorites“

Done.