Collect: Build sometimes hangs on jacocoDebug step

Created on 30 Jul 2019  路  10Comments  路  Source: getodk/collect

Android Studio 3.4.1, Gradle 3.4.0

I suddenly started experiencing this frequently a couple of weeks ago. @zestyping has mentioned getting it as well.

When I run from Android Studio, typically the jacocoDebug step takes about 1 second. Occasionally, it will hang for several minutes and my CPU fans will go full blast. I have not investigated this. I'm hoping that when @grzesiek2010 updates all the things after v1.23 goes out, it will go away.

In the mean time, if anyone else experiences this, it would be helpful to gather a bit more information about the conditions.

help wanted needs information

Most helpful comment

I am also seeing this for some time now in Android Studio 3.4.2 and Gradle 3.3.2. A build can take up to 10 minutes where one of 1 minute is normal.

One strange thing I found out is that when I cancel the build and restart it right after it will run just fine.

All 10 comments

Thanks for noting this! My experience pretty much matches your description exactly. It feels like this happens half the time, but that's probably an exaggeration because I really notice it when it happens and don't notice it when it doesn't.

@zestyping you still seeing this? I feel like I haven't for a little while now.

This post is probably a massive self jinx.

I just hit this again. @seadowg still no issue? Maybe it's an Android Studio thing and updating to 3.5 fixed it? I'm now upgrading and will report back if it happens again.

I did see it the other day but on an older branch. Will report back if I see it on something more up to date.

I am also seeing this for some time now in Android Studio 3.4.2 and Gradle 3.3.2. A build can take up to 10 minutes where one of 1 minute is normal.

One strange thing I found out is that when I cancel the build and restart it right after it will run just fine.

I doubt it helps very much, but I'm seeing this issue on my own project (completely unrelated to ODK Collect). This issue is the only relevant result I found from googling.

AS 3.5
Gradle 5.4.1
AGP 3.5

Exact same behavior as @ramoge - a build will take 8-10 mins where a normal one takes 1-2, and stopping/restarting seems to build like normal. Does not seem to matter if I do the build via command line, which seems to indicate an issue with gradle?

What helped for me was setting _testCoverageEnabled_ to false in the build.gradle file. The jacocoDebug step is skipped and the build won't take so much time anymore.

@ramoge yeah it's definitely that as we use Jacoco for test coverage. It might be interesting to see if we can rethink our build types to give ourselves a faster debug build for day to day dev...

I'm still getting this periodically.
AS 3.5
Gradle 5.6.3
AGP 3.5.1

It feels like I wasn't experiencing for a while but I may just not have been in the code as much. It seems to maybe be related to switching branches?

@lognaturel yeah for me it seems to be with built have code left hanging about. Always ok if I rebuild (in AS) when switching branches.

Was this page helpful?
0 / 5 - 0 ratings