To run a command to create a desktop file:
sudo gedit/usr/share/applications/android_studio.desktop
Open the window and enter the following, noting that exec and icon are modified to the path of Android studio under their own system.
[Desktop Entry]
Type=application
Name=android Studio
Exec= "/opt/android-studio/bin/studio.sh"%f
Icon=/opt/android-studio/bin/studio.png
Categories=development;ide;
Terminal=false
Startupnotify=true
Startupwmclass=jetbrains-android-studio
Save the closing file and run the following command to add the Execute permission:
sudo chmod +x/usr/share/applications/android_studio.desktop
After that, use the command to open the Applications folder:
sudo nautilus/usr/share/applications
Locate the Android_studio.desktop file, and drag the file onto the Launcher bar.
Add the run icon for Android studio on launcher in Ubuntu