Upgrading to Unity 2018 added 15mb and unnecessary files to APK

Generally all scripts are compiled into a single DLL (techically a few different DLLs, see the contents of Library/ScriptAssemblies), whether they are used or not.

Then at final build time, they go into the target binary, and there MAY be stripping that happens.

If you are building IL2CPP, the stripping works quite differently, and again unused code MAY be removed.

Details are unclear and subject to change with every version of the toolchains. Google for yourself.

Either way, 0.1k times 2 is unlikely to sink your battleship.

Today when I was building iOS, I encountered the same problem. Unity told me that I didn’t install the iOS support, but this is not true. So I switched the target platform to standalone, and opened the build setting window, it said that I needed to download iOS support, however, I actually had already installed it. So I just restarted Unity, I open the build setting window again, everything went back to normal, I could build iOS as usual. But this time, the final build size didn’t get increased compare to the last one. So I can safely say that the suddenly increase of the Android build size is not relevant to the issue I described here.
I tried the build size reducing techniques that Unity staffs mention here, I tweaked some of the settings in Player Setting, I managed to reduce my apk file size to 99MB. However, it didn’t explain why build size suddenly increased by 16MB, my build size was 96MB and it didn’t require any tweaking.

Well that makes sense. Thanks. What doesn’t make sense is that I haven’t found a way yet to create an SDK that didn’t require network permissions. ( https://forum.unity.com/threads/why-are-there-unused-packages-in-my-build-specifically-networking.600340/#post-4016251 )

Starting to doubt if that is even possible at all.

I am using Unity 2018.3.02f, I found that if we don’t uninstall the unnecessary packages in the Package Manager, Unity will include useless dll files in the build because these unnecessary packages are using these dll files. I successfully removed these useless dll files by uninstalling the unnecessary packages in the Package Manager without modifying the AndroidManifest.xml. However, even if we get rid of the useless dll files, it’s only a few KB of difference, the problem here is that our build size suddenly increases by 16MB for unknown reason, so the useless dll files are definitely not the source of the problem here.

I went from 2 GB to more than 6 GB spread over three asset files. This is absolutely ridiculous: it is exactly the same game, and now none of my textures render because of an issue that has been persisting since september last year: Unity claiming to be 64 bit while it isn’t and can’t handle asset files larger than 4 GB.

I walk with similar issues, my APKs still empty, comes with a 25MB and 30MB. I hope Unit 2019 can address these unused native size issues and native references.

sorry about my English :stuck_out_tongue: