简体   繁体   English

即使我做了 flutter clean,flutter build apk 也会创建旧版本的应用程序

[英]flutter build apk create old version app even though I did flutter clean

flutter build apk command keeps creating old version app. flutter build apk 命令不断创建旧版本的应用程序。

I have done troubleshooting in several ways using:我使用以下几种方式进行了故障排除:

  • flutter clean -> flutter build apk flutter clean -> flutter build apk
  • modify version in pusbspec.yaml to 1.0.1+2将 pusbspec.yaml 中的版本修改为 1.0.1+2
  • flutter create newproject -> copy lib and pubspec.yaml -> flutter build apk flutter create newproject -> 复制 lib 和 pubspec.yaml -> flutter build apk
  • flutter clean -> flutter build apk --release flutter clean -> flutter build apk --release

However, none of the above method solve my problem.但是,上述方法都没有解决我的问题。 The only solution is build apk in debug mode.唯一的解决方案是在调试模式下构建 apk。

flutter build apk --debug

But the output file has a quite large size memory.但是输出文件有相当大的内存。 Any suggestion such that I can build apk forced in the latest version and release mode?有什么建议可以让我在最新版本和发布模式下强制构建 apk?

run pub-get after you modify your pusbspec.yaml修改 pusbspec.yaml 后运行pub-get

there are 2 common ways:有2种常见的方式:

  1. From the terminal: Run flutter pub get .从终端:运行flutter pub get
  2. Click pub-get on top right usually of your pusbspec.yaml file通常单击 pusbspec.yaml 文件右上角的pub-get

After that, try to build your APK.之后,尝试构建您的 APK。 Hope this can solve your issue :D希望这可以解决您的问题:D

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我解压了一个文件 apk 将旧版本的 java 更新为 Flutter - I extract a file apk To update the old version java to Flutter 即使 Web 版本 100% 不同,我是否应该在同一个 Flutter 项目中为 android 和 iOS 拥有应用程序的 Web 版本? - Should I have the web version of an app in the same Flutter project for android and iOS, even though the web version is 100% different? “flutter build apk”没有构建所有必要的 pub 包,即使这些包在我的 flutter 应用程序中使用 - “flutter build apk” is not building all necessary pub packages even those packages are used in my flutter app 每次我重新启动应用程序时,Flutter 都会加载旧版本的应用程序 - Flutter loads old version of app every time I restart the app 当我对 flutter 项目执行 flutter clean 时出现错误 - Errors showed up when i did flutter clean on flutter project github 操作 flutter 给出错误“工件模式:build/app/outputs/apk/release/*.apk 与任何文件不匹配” - github actions flutter gives error 'Artifact pattern :build/app/outputs/apk/release/*.apk did not match any files' flutter 中的 APK 或 Android App Bundle 的版本代码没有改变。即使从 pubspec.yaml 更改它之后 - version code not changing of APK or Android App Bundle in the flutter. Even after changing it from pubspec.yaml 颤振构建 apk 错误 - flutter build apk Errors Flutter如何构建APK - Flutter how to build APK 颤振构建 apk 有错误 - flutter build apk with errors
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM