ubuntu+Android-Studio+JDK
in ubuntu其他 with 0 comment

ubuntu+Android-Studio+JDK

in ubuntu其他 with 0 comment

1、下载:得到android-studio-ide-143.3101438-linux.zip

https://developer.android.com/studio/index.html

2、安装:

sudo gedit /usr/share/applications/android-studio.desktop

输入:

[Desktop Entry]
Name=WebStorm
Comment=webstorm
Exec=/home/duuge/app/android-studio/bin/studio.sh
Icon=/home/duuge/app/android-studio/bin/studio.icon
Terminal=false
Type=Application

最后一步,进入文件管理器进入目录/usr/share/applications/,找到刚上面创建的android-studio的快捷方式(就是上logo那个icon图标,很好找的鸟图),复制,放桌面里,开机就看到它了。

运行报错:

No JDK found. Please validate either STUDIO_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.
解决办法:到http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
下载JDK得到jdk-8u101-linux-x64.tar.gz,解压

tar xzvf jdk-8u101-linux-x64.tar.gz

解压为jdk文件夹,然后

mv jdk /usr/lib/jvm

(如果还没有jvm文件夹则mkdir /usr/lib/jvm/创建一个文件夹解决)。

update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk/bin/java 1
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk/bin/javac 1
update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk/bin/javaws 1
update-alternatives --config java
update-alternatives --config javaws

OK完成了,测试一下看看java是否安装成功:查java版本号出来是java8的就行:

java -version

可能会需要安装以下:

apt-get install lib32ncurses5 ia32-libs

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

Search for install instructions for your particular linux configuration (Android KVM linux Installation) that KVM is enabled for faster Android emulator performance.

最后,双击运行桌面的Android-Studio图标。
The end.

Responses