0

我打开了一个旧项目,它分为 6 个模块,Android Studio但在构建任务中总是失败。我的环境是:

Ubuntu 14.04
OpenJDK7
Android Studio 2.2 preview 2

大多数模块的构建都失败了,并告诉我它找不到 Java 编译器,这是错误跟踪:

What went wrong:
Execution failed for task ':maskable_layout:compileReleaseJavaWithJavac'.
Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

我确定我的机器上安装了 JDK,我尝试在我的配置文件中安装Oracle Java和修改,但错误并没有消失。JAVA_HOME.bachrc

4

1 回答 1

0

答案是回到旧版本的Android Studio 2.1. 这似乎是新版本的问题,Android Studio现在我在旧版本上运行良好。

于 2016-06-12T14:20:12.233 回答