美文网首页
Mac 打包flutter android 版本包,错误记录

Mac 打包flutter android 版本包,错误记录

作者: 风吹吹 | 来源:发表于2022-10-10 11:06 被阅读0次

    1.错误场景:终端运行

    flutter build apk --flavor prob -t lib/main.dart --obfuscate --split-debug-info=/.symbols
    
    

    运行结果

    FAILURE: Build failed with an exception.                                
                                                                            
    * Where:                                                                
    Script '/Users/nvr-dev/Applications/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 991
                                                                            
    * What went wrong:                                                      
    Execution failed for task ':app:compileFlutterBuildProbRelease'.        
    > Process 'command '/Users/nvr-dev/Applications/flutter/bin/flutter'' finished with non-zero exit value 1
                                                                            
    * Try:                                                                  
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                            
    * Get more help at https://help.gradle.org                              
                                                                            
    BUILD FAILED in 18s                                                     
    Running Gradle task 'assembleProbRelease'...                            
    Running Gradle task 'assembleProbRelease'... Done                  29.3s
    Gradle task assembleProbRelease failed with exit code 1
    
    

    解决:

    --obfuscate --split-debug-info=/.symbols
    

    打包命令的这一段指的是混淆打包,这一段去掉,运行“flutter build apk --flavor prob -t lib/main.dart”就可以正常打包了

    相关文章

      网友评论

          本文标题:Mac 打包flutter android 版本包,错误记录

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