android-studio – Android Studio 1.1.0在编辑build.gradle时挂起

前端之家收集整理的这篇文章主要介绍了android-studio – Android Studio 1.1.0在编辑build.gradle时挂起前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的机器有8 GB的RAM.我安装了 Android Studio 1.1.0并应用了他们发布的所有东西 here.

一切都适用于一个小的Hello World应用程序.但是当我开始编辑我们从Eclipse移过的一个大项目的build.gradle时,IDE挂起了20或30秒.即使我不添加删除任何行,它也会挂起.即使我只是按回车.此外,我没有看到任何进程运行(索引,同步等)在底部.

我检查了文件 – >设置 – > Gradle和Use auto-import未被选​​中.

正如他们建议的那样,我运行了jstack -l< pid> > dump.txt并在https://code.google.com/p/android/issues/detail?id=82706#c35上发布了一个消息以及dump.txt

我不能在这里附加相同的dump.txt,因为它包含大约800行.

解决方法

经过一段时间研究这个问题,我发现这是Android问题跟踪器论坛中的一个活跃的问题.

https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=59965

你会在这个线程中看到我的评论,但我也会在这里发布

I did find out WHY my build.grade would hang upon touching (any amount
of editing once so ever).

I had a statement where I would iterate over all the variants and
would then iterate over each variant’s outputs and do a filter among
an xml file. Commenting the filter portion out would remove the
hanging/freezing problem. In fact only iterating over the first output
(of the first variant) would drastically reduce this lag time,still,
very annoying.

I would suggest starting your build.gradle file from scratch and
adding parts progressively until you come across the portion in which
hangs the editing process.

EITHER WAY,this hang shouldn’t happen since I’m merely editing the
file,not compiling nor running.

Hopefully this can help someone

原文链接:https://www.f2er.com/android/312727.html

猜你在找的Android相关文章