When I package APK, BUILD COMMAND COMPLETED is fall in infinite loop

Hi, When I package APK. Packaging APK fall in infinite loop sometime. But build log show build successful.
Packaging APK take usually 83s in normal but sometime it fall in infinite loop.
There is no error when I package APK and CPU, RAM, SSD storage is enough.
Here is the normal log and infinite loop log.
Help me please.

normal log

infinite loop log