美文网首页Flutter
Flutter-Android打包注意事项

Flutter-Android打包注意事项

作者: 节庆007 | 来源:发表于2019-10-08 11:38 被阅读0次

    1.按照官方文档生成签名文件,修改build文件和manifest文件:
    https://flutterchina.club/android-release/
    2.注意AndroidX的适配问题,详见:
    https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility#recommended-use-android-studio-to-migrate-your-app
    3.release模式混淆压缩注意事项:
    在 "proguard-rules.pro" 文件中,我们就要加入 -dontwarn 语句对第三方库进行报错屏蔽,否则proguard的代码混淆无法进行

    #Flutter Wrapper
    -dontwarn io.flutter.**
    -keep class io.flutter.app.** { *; }
    -keep class io.flutter.plugin.**  { *; }
    -keep class io.flutter.util.**  { *; }
    -keep class io.flutter.view.**  { *; }
    -keep class io.flutter.**  { *; }
    -keep class io.flutter.plugins.**  { *; }
    

    相关文章

      网友评论

        本文标题:Flutter-Android打包注意事项

        本文链接:https://www.haomeiwen.com/subject/zwcbpctx.html