Android Studio Gradle构建永远运行(Android Studio Gradle build runs forever)

系统教程 行业动态 更新时间:2024-06-14 17:03:54
Android Studio Gradle构建永远运行(Android Studio Gradle build runs forever)

我刚在笔记本上安装了Ubuntu 16.04和Android Studio。 在尝试构建项目时,gradle构建没有完成(它运行了一个多小时)。 EventLog中唯一的一行是:

"Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]".

我安装了32位版本的linux。 另外zlib1g似乎已安装,我发现这是此问题的常见原因。 我还在Gradle设置中勾选了“脱机工作”选项。

关于这个问题的任何想法?

谢谢你的帮助

I just installed Ubuntu 16.04 and Android Studio on my notebook. When trying to build a project, the gradle build doesn't finish (it ran for more than an hour). The one and only line in the EventLog is:

"Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]".

I installed the 32-bit version of linux. Also zlib1g appears to be installed, which i found out is a common reason for this problem. I also tickled the "Work Offline" option in the Gradle settings.

Any ideas on that issue?

Thx for your help

最满意答案

我不久前找到了解决方案。 所以万一有人遇到同样的问题:

Android停止支持来自buildToolsVersion 24的32位操作系统。因此,如果你遇到同样的问题而且你正在使用buildTools 24或更高版本,只需在build.gradle文件中将它们设置为23,同步,你应该没问题。

I found the solution myself a while ago. So just in case someone has the same problem:

Android stopped supporting 32-bit OSes from buildToolsVersion 24. So, if you have the same problem and you're using buildTools 24 or higher, just set them to 23 in your build.gradle file, sync, and you should be ok.

更多推荐

本文发布于:2023-04-24 14:13:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/df50d714952bb8e062edec9a5b4d8364.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Studio   Android   Gradle   runs   build

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!