Android Studio only works in console mode on Ubuntu

I have a problem with Android Studio on Ubuntu. So far, I have been using Android Studio in console mode by going to the android-studio / bin folder and running studio.sh. It works well, but for me it’s boring to type commands every time I want to run it, I would prefer to open it just by clicking on the shortcut. So, I tried to create a shortcut in my taskbar.

In /usr/share/applicationsI created a file called "android-studio.desktop". Here is the contents of the file:

[Desktop Entry]
Type=Application
Terminal=false
Name=Android Studio
Icon=/home/chugrothas/android-studio/bin/androidstudio.svg
Exec=/home/chugrothas/android-studio/bin/studio.sh

Then I dragged the desktop file to the taskbar. When I try to open Android Studio using my new shortcut, I get:

No JDK. Please check either STUDIO_JDK, JDK_HOME, or JAVA_HOME environment variable indicates a valid JDK installation.

, echo $JAVA_HOME, :

/home/chugrothas/jdk1.7.0_71

PATH ( PATH):

://chugrothas/jdk1.7.0_71/

Android Studio , JAVA_HOME , , ...

. , AS, , .

!

+4
2

, JAVA_HOME .

/etc/environment, . :

sudo nano /etc/environment

:

JAVA_HOME="/home/chugrothas/jdk1.7.0_71"

.

. Android Studio Dash , . (Configure/Create Desktop Entry) Tools/Create Desktop Entry... jetbrains-android-studio.desktop ~/.local/share/applications.

+5

:

1) gedit :

[ ] Version = 1,0 = Android Studio = Exec =///Android-//studio.sh Icon =///Android-//idea.png Terminal = Type = Application = Utility; ;

Exec Icon. .desktop .

2) , : sudo chmod + x/home/jayant/android-studio/bin/studio.sh

, .

0

All Articles