这两天一直在搞Ubuntu16.04LTS,因为是新手,研究了好久才装上android studio. 弄好后, 点击 as 上面的SDK Manager 在点击launch standal one sdk manager 后 无反应。折腾了好久才弄好。
环境
- Ubuntu16.04
- JDK 1.8.0_91
- Android studio2.1.1
进入sdk目录/tools 终端运行Android提示 sudo ./android ./android: 1: ./android: java: not found ./android: 1: ./android: java: not found ./android: 110: exec: java: not found
解决方法
sudo update-alternatives --install /usr/local/bin/javac javac /opt/java/jdk1.8.0_91/bin/javac 0 sudo update-alternatives --install /usr/local/bin/java java /opt/java/jdk1.8.0_91/bin/java 0
注: /opt/java/jdk1.9.0_91 是jdk 的安装目录