我用Android Studio
打开了一个旧项目,分为6个模块,但在构建任务中总是失败。我的ENV是:
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
和修改过的JAVA_HOME
,但是错误并没有消失。
发布于 2016-06-12 06:20:12
答案是回到旧版本的Android Studio 2.1
。这似乎是一个新的Android Studio
的问题,它现在与我的旧版本工作良好。
https://stackoverflow.com/questions/37775294
复制