Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

> 希望能够支持压缩后的Apk,否则太大了影响用户下载 #5

Closed
aboutmydreams opened this issue Mar 29, 2020 · 3 comments

Comments

@aboutmydreams
Copy link

你如果用的是flutter build apk --release命令的话,建议增加如下配置试一下:

    buildTypes {
        release {
            minifyEnabled false
            shrinkResources false
            signingConfig signingConfigs.debug
        }
    }

能兼容 压缩资源跟压缩代码那

Originally posted by @li305263 in #3 (comment)

@aboutmydreams
Copy link
Author

嗯嗯,但是目前大多数人是有分包需求的,使用这条命令打包,这种方式将apk缩小了近一半
但是这种情况下插件无法安装新版本
flutter build apk --target-platform android-arm,android-arm64 --split-per-abi

@xuexiangjys
Copy link
Owner

xuexiangjys commented Mar 30, 2020

一样的,使用原生进行打包同样也能压缩apk大小,你只需要配置ndk支持的类型也一样能达到效果。

        ndk {
            abiFilters 'armeabi', 'armeabi-v7a'
           // , 'arm64-v8a'
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants