无法确定Java版本,Android工作室,Ubuntu14.04吗 - Could not determine Java version, Android Studio, Ubuntu 14.04

- 此内容更新于:2016-02-03
主题:

当导入一个项目从Git风投,Android工作室下载,然后要求从Gradle导入项目。我选择“使用默认gradle包装器”,它似乎工作但我得到一个错误“无法确定Java版本”。我用甲骨文Java8,这显然是被指出在Android工作室配置。可能是讨论项目中使用的版本吗?

原文:

When importing a project from Git VCS, Android Studio downloads it and then asks to import the project from Gradle. I choose "Use default gradle wrapper" and it seems like it's working but then I get an error "Could not determine Java version". I'm using Oracle Java 8, it's clearly being pointed to in the Android Studio config. Could it be talking about the version used in the project?

解决方案:
固定的。我没有注意。JDK的位置是指向不同的java版本(java-gcj-4.8)而不是java-8-oracle。
原文:

Fixed. I wasn't paying attention. The JDK location was pointing to a different version of java (java-gcj-4.8) instead of java-8-oracle.