Building APK is taking an absurdly long amount of time
I've been building my project for more than 24 hours and it's still not even close to being done. It's only finished building one scene (which was a menu) and has spent most of this time working on my first actual level. I don't think the scene has too much stuff in it, what other things could be causing this problem?
So I found something interesting, I had to cancel my initial build because my computer was getting pretty messed up after staying on for so many days. I sent it to a friend and asked him to build it, and it had the same problem, so it's not my computer, I removed a good chunk of the game objects from the scenes and the problem persisted. This time, however, I noticed that ins$$anonymous$$d of being stuck on "Light transport" like the first time, it was stuck on "Clustering". I have no idea what either of those things mean, but I do know that 1) $$anonymous$$y computer isn't the problem and 2) the amount of game objects isn't the problem.
I've found that Unity will seem to "run away" when the OS is very low on memory (I've seen this happen on both OSX and Windows). Freeing memory and restarting Unity may help...
I made an empty project and build an AP$$anonymous$$ for it. It only took a $$anonymous$$ute after I worked out some complications. So now I know that the problem is definitely not unity itself, and it's co$$anonymous$$g from within the project itself. I will see what I can find from there.
I cut out a bunch of unused imported assets and decreased the size of the folder tremendously. This still didn't work. It got stuck again on Light Transport. I feel like if I could just know what that means I would know how to fix it. $$anonymous$$aybe. I never did much with the lights, I only added a second directional light with less intensity in the opposite direction of the first because the shadows were intense no matter what i did with the settings
A Google search for "Light Transport" turns up a lot of results of people complaining about the same thing. Have you read through some of that? One suggestion claimed that reducing the size (scale = 0.01) allowed them to get past the problem. $$anonymous$$aybe you could try that just to see if it's indeed the same issue...
Answer by AurimasBlazulionis · Sep 08, 2016 at 09:17 AM
When the project is being built, it bakes lightmaps and global illumination. This takes a lot of time, if it is not a final product, disable precomputed dynamic GI and other GI options inside window/lighting. Also, uncheck auto option in that window, ambient lighting is completely enough for testing unless your game focusses on lighting.
Another option would be selecting all static objects and uncheck lightmap static in a drop down near the static check box.
This is what I did just before reading this answer. I have the apk built, thank you guys for helping
Answer by meeruTheCoder · Aug 06, 2018 at 01:45 PM
Thanks, I turned off Baked GI, and it started building quicker. The best part is, nothing happened to my scene, so there is no price to pay. Cool!
Answer by Chethan007 · Jan 10 at 11:57 AM
For me I saw that while building after half an hour or so it was stuck in some library/bee/..... folder.
So I closed the project, deleted the library folder and restarted Unity. The error went away.
Hope this helps someone
Your answer
Follow this Question
Related Questions
"com.google.common.base.verifyexception" Can't build my android game 0 Answers
Is anyone else having problems with gvr responding to phone movement android? 1 Answer
Build an APK gets error 1 Answer
Build APK for Android doesn't transfer and start on phone by itself 0 Answers
I try to create apk on unity 2018.2b version but get error 1 Answer