Gradle构建时间非常不稳定且无效

时间:2015-02-23 22:30:23

标签: android android-studio gradle

我已经在gradle构建文件中增加了内存,这些是我的构建时间,在应用程序中进行了少量更改(没有额外的依赖项)。 有时构建时间会增加100%

12:01:20 PM Gradle build finished with 4 warnings(s) in 1 min 11 sec
12:01:28 PM Session 'app': running
12:01:49 PM Session 'app': debugger connected
12:36:51 PM Gradle build finished with 4 warnings(s) in 1 min 5 sec
12:37:05 PM Session 'app': running
12:37:24 PM Session 'app': debugger connected
12:39:47 PM Gradle build finished with 4 warnings(s) in 58 sec
12:39:51 PM Session 'app': running
12:40:10 PM Session 'app': debugger connected
1:29:28 PM Gradle build finished with 4 warnings(s) in 14 sec
1:36:17 PM Gradle build finished with 4 warnings(s) in 54 sec
1:36:26 PM Session 'app': running
1:36:45 PM Session 'app': debugger connected
1:43:45 PM Gradle build finished with 4 warnings(s) in 55 sec
1:44:55 PM Session 'app': running
1:45:15 PM Session 'app': debugger connected
1:46:13 PM Gradle build finished with 4 warnings(s) in 14 sec
1:46:37 PM Session 'app': running
1:46:56 PM Session 'app': debugger connected
1:47:26 PM Gradle build finished with 4 warnings(s) in 12 sec
1:47:33 PM Session 'app': running
1:47:51 PM Session 'app': debugger connected
1:59:11 PM Gradle build finished with 4 warnings(s) in 0 sec
1:59:17 PM Session 'app': running
1:59:35 PM Session 'app': debugger connected
2:23:38 PM Gradle build finished with 4 warnings(s) in 50 sec
2:23:42 PM Session 'app': running
2:24:01 PM Session 'app': debugger connected
2:25:27 PM Gradle build finished with 4 warnings(s) in 1 min 0 sec
2:26:37 PM Gradle build finished with 4 warnings(s) in 1 min 1 sec
2:26:49 PM Session 'app': running
2:27:07 PM Session 'app': debugger connected
2:42:49 PM Gradle build finished with 4 warnings(s) in 52 sec
2:42:54 PM Session 'app': running
2:43:12 PM Session 'app': debugger connected
2:48:22 PM Gradle build finished with 4 warnings(s) in 59 sec
2:48:29 PM Session 'app': running
2:49:21 PM Session 'app': debugger connected
3:01:38 PM Gradle build finished with 4 warnings(s) in 55 sec
3:01:44 PM Session 'app': running
3:08:49 PM Gradle build finished with 4 warnings(s) in 50 sec
3:09:01 PM Session 'app': running
3:09:19 PM Session 'app': debugger connected
3:12:55 PM Gradle build finished with 4 warnings(s) in 1 min 2 sec
3:13:01 PM Session 'app': running
3:13:20 PM Session 'app': debugger connected
3:15:54 PM Gradle build finished with 4 warnings(s) in 54 sec
3:16:08 PM Session 'app': running
3:16:28 PM Session 'app': debugger connected
3:32:39 PM Gradle build finished with 4 warnings(s) in 50 sec
3:33:12 PM Session 'app': running
3:33:30 PM Session 'app': debugger connected
3:50:46 PM Gradle build finished with 4 warnings(s) in 1 min 3 sec
3:51:12 PM Session 'app': running
3:51:31 PM Session 'app': debugger connected
4:11:38 PM Update Info: Android Studio is ready to update.
4:12:28 PM Gradle build finished with 4 warnings(s) in 2 min 14 sec
4:12:35 PM Session 'app': running
4:12:53 PM Session 'app': debugger connected
4:16:12 PM Gradle build finished with 4 warnings(s) in 2 min 5 sec
4:16:37 PM Session 'app': running
4:16:56 PM Session 'app': debugger connected
4:24:38 PM Gradle build finished with 4 warnings(s) in 2 min 26 sec
4:25:11 PM Session 'app': running
4:25:28 PM Session 'app': debugger connected
4:45:46 PM Gradle build finished with 4 warnings(s) in 2 min 18 sec
4:45:51 PM Session 'app': running
4:46:12 PM Session 'app': debugger connected
4:56:40 PM Gradle build finished with 4 warnings(s) in 2 min 27 sec
4:56:47 PM Session 'app': running
4:57:07 PM Session 'app': debugger connected
5:05:26 PM Gradle build finished with 4 warnings(s) in 2 min 18 sec
5:05:31 PM Session 'app': running
5:05:52 PM Session 'app': debugger connected
5:07:50 PM Gradle build finished with 4 warnings(s) in 2 min 9 sec
5:07:55 PM Session 'app': running
5:08:14 PM Session 'app': debugger connected
5:13:04 PM Gradle build finished with 4 warnings(s) in 2 min 10 sec
5:13:10 PM Session 'app': running
5:13:29 PM Session 'app': debugger connected
5:17:13 PM Gradle build finished with 4 warnings(s) in 2 min 2 sec
5:17:22 PM Session 'app': running
5:17:41 PM Session 'app': debugger connected
5:22:36 PM Gradle build finished with 4 warnings(s) in 2 min 9 sec
5:22:40 PM Session 'app': running
5:22:59 PM Session 'app': debugger connected
5:26:18 PM Gradle build finished with 4 warnings(s) in 2 min 7 sec
5:26:25 PM Session 'app': running
5:26:44 PM Session 'app': debugger connected
5:35:50 PM Gradle build finished with 4 warnings(s) in 2 min 5 sec
5:36:05 PM Session 'app': running
5:36:24 PM Session 'app': debugger connected
5:42:34 PM Gradle build finished with 4 warnings(s) in 2 min 11 sec
5:42:47 PM Session 'app': running
5:43:07 PM Session 'app': debugger connected
5:50:09 PM Gradle build finished with 4 warnings(s) in 1 min 55 sec
5:50:13 PM Session 'app': running
5:50:18 PM Session 'app': error
5:50:43 PM Gradle build finished with 4 warnings(s) in 15 sec
5:50:46 PM Session 'app': running
5:51:04 PM Session 'app': debugger connected
5:55:55 PM Gradle build finished with 4 warnings(s) in 2 min 17 sec
5:56:00 PM Session 'app': running
5:56:22 PM Session 'app': debugger connected
10:29:35 AM Gradle build finished with 4 warnings(s) in 24 sec
10:29:45 AM Session 'app': running
10:30:16 AM Session 'app': debugger connected
10:43:01 AM Gradle build finished with 4 warnings(s) in 1 min 59 sec
10:44:00 AM Session 'app': running
10:44:15 AM Session 'app': debugger connected
10:56:17 AM Gradle build finished with 4 warnings(s) in 2 min 14 sec
10:56:24 AM Session 'app': running
10:56:40 AM Session 'app': debugger connected
11:38:07 AM Gradle build finished with 4 warnings(s) in 2 min 7 sec
11:38:12 AM Session 'app': running
11:38:27 AM Session 'app': debugger connected
11:53:11 AM Gradle build finished with 4 warnings(s) in 2 min 8 sec
11:53:16 AM Session 'app': running

解决此问题的明确方法?

1 个答案:

答案 0 :(得分:0)

“不稳定”的构建时间是由@David M. Karr所述的设计。如果您尝试提高效果,建议您在org.gradle.configureondemand文件中启用org.gradle.daemongradle.properties