一切都适用于一个小的Hello World应用程序.但是当我开始编辑我们从Eclipse移过的一个大项目的build.gradle时,IDE挂起了20或30秒.即使我不添加或删除任何行,它也会挂起.即使我只是按回车.此外,我没有看到任何进程运行(索引,同步等)在底部.@H_502_3@
我检查了文件 – >设置 – > Gradle和Use auto-import未被选中.@H_502_3@
正如他们建议的那样,我运行了jstack -l< pid> > dump.txt并在https://code.google.com/p/android/issues/detail?id=82706#c35上发布了一个消息以及dump.txt@H_502_3@
我不能在这里附加相同的dump.txt,因为它包含大约800行.@H_502_3@
解决方法
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@H_502_3@
你会在这个线程中看到我的评论,但我也会在这里发布@H_502_3@
I did find out WHY my build.grade would hang upon touching (any amount
of editing once so ever).@H_502_3@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. @H_502_3@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.@H_502_3@EITHER WAY,this hang shouldn’t happen since I’m merely editing the
file,not compiling nor running. @H_502_3@Hopefully this can help someone@H_502_3@