gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 15:52:07 24 4
gpt4 key购买 nike

我的机器有 8 GB 的 RAM。我安装了 Android Studio 1.1.0 并应用了他们发布的所有内容 here.

使用小型 Hello world 应用程序一切正常。但是当我开始编辑时 build.gradle在我们从 Eclipse 转移的一个大项目中,IDE 挂起 20 或 30 秒。即使我不添加或删除任何行,它也会挂起。即使我只是按 Enter 键。此外,我在底部没有看到任何正在运行的进程(索引、同步等)。

我查了 File -> Settings -> Gradle , 和 Use auto-import未检查。

按照他们的建议,我跑了 jstack -l <pid> > dump.txt并与 dump.txt 一起发布了一条消息在 https://code.google.com/p/android/issues/detail?id=82706#c35

我不能附上相同的 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

关于android-studio - Android Studio 1.1.0 在编辑 build.gradle 时挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29970867/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com