Android Studio jre 错误

Android Studio jre 错误

我正在尝试在 Ubuntu 14.04 中安装 Android Studio。(AMD 处理器)

安装命令后立即./studio.sh返回以下消息:

/usr/local/java/jdk1.8.0_65/bin/java: 6: /usr/local/java/jdk1.8.0_65/bin/java: Syntax error: ")" unexpected

有人能帮我解决这个问题吗?

答案1

您下载了不适合您系统的体系结构。

$ file /usr/local/java/jdk1.8.0_65/bin/java
/usr/local/java/jdk1.8.0_65/bin/java: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.7.0, BuildID[sha1]=4d4d0222e883a3bf4320256278c6c0bfe14a1c11, not stripped

ARM aarch64

$ uname -a
Linux maurice-HP-ProBook-455-G1 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

x86_64

你需要Linux x64不是 Linux ARM

删除 Java 安装

sudo rm -r /usr/local/java/jdk1.8.0_65

并安装正确的架构......


安装Oracle Java

sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

安装OpenJDK

sudo apt-get install openjdk-8-jdk

相关内容