6

I love the new incremental Java compile in IDEA 12.0 but there seems to be a price to pay. Making now takes about twice as long as in 11.x, most of the time appearing to be spent

Executing DEX

(according to the status bar).

I can take a 12.0 project, revert to 11.x and making is back to "normal speed" (approx 4 minutes vs 30 seconds).

I don't get this. AFAIK, IDEA (or Eclipse or any other IDE) is just shelling out to dx.jar to compile the Dalvik executable. If there was a problem with the ADT, it would affect 11.x equally.

OS is Win 7 Ultimate. 3.2GHz quad core with 16GB but I suspect that the issue is not related to OS or PC since 11.x is OK.

Any ideas? I'll log a bug with Jetbrains but wanted to see if anyone has more concrete info or workarounds? There's nothing so far on the Jetbrains bug tracker or fora that I can find.

4

1 回答 1

1

过去我遇到过几次这个问题,这一直是由于包含了一个在构建过程中挂起的全局库。

有一次是由于在构建 Android 项目时尝试执行 Python 库,因为我的 Android 项目中有一个 Python 文件,而 IntelliJ 决定将 Python 运行时库添加到我的项目依赖项中。

最近,当我在 Android 项目中有一个 gradle 文件时,Groovy 也发生了同样的事情。

对我来说,我只是从项目中删除了这些依赖项,问题就自行解决了。

在我的情况下,我通过强制杀死(kill -9)正在运行 make 的 java 进程发现了这一点。这导致 intellij 将错误转储到 IDE 中的 Messages 视图,我可以看到 groovy 正在尝试执行。

于 2013-09-27T20:23:55.720 回答