Is there any solution of ANR?

Thanks! Hope it fixed

So recently these ANR surged on play console for my app but after debugging it for some time i found out the the problem was in a deadlock for a process which blocks the main thread and nothing can happen after that.

So, a solution for this could be if you start doing the heavy or suspicious tasks on separate threads so that your main thread doesn’t get blocked and game continues to work. This issue can be device specific for some of the processes as i still get counts of 20-30 daily on a 1 lakh dau, so it is really hard to debug this as you cannot guess which process might be breaking in devices, but definitely it is not related to device ram/os because i have seen it happening in pixel and samsung galaxy series.

Do drop a solution if you find out on this thread.

I encountered the same issue. (cocos2d-x 3.17.2)
But it only surfaced after I integrated Admob SDKBOX sdk.
Before that, even cocos2d-x 3.17.2 worked without this ANR.

Any idea?

@joappdev, I suffered from the same issues (Latest SDKBox issue).
I downgraded SDKBox to v2.4.3.3 and now its ok, ANR level is very low.

@angelvet thanks for reply.
Unfortunately I’m using v2.4.3.3…
I’m trying this fix https://github.com/cocos2d/cocos2d-x/pull/19996 , commented super.onPause().
Hope it works.