For business needs, The Unity game needs to pour out the Android project and use Android Studio to package into APK. However, when I type it out, I find that the package printed by Unity is relatively slow, and the package printed by AS is relatively slow. Then I compare the two packages, and the only difference is that the package size of the two packages is different. The unity package is larger, so there may be uncompressed files. It turned out to be the case; Then go to the official website to find gradle packaging Settings;

website

  • Solution: Add files to buid.gradle andorid that need to be uncompressed

    aaptOptions {
        noCompress '.unity3d'.'.ress'.'.resource'.'.obb'
    }
    Copy the code

If it helps you, leave a thumbs-up