gpt4 book ai didi

Flutter 不使用来自 pubspec.yaml 的内部版本号

转载 作者:行者123 更新时间:2023-12-04 12:57:02 25 4
gpt4 key购买 nike

当我跑 flutter build run我希望版本和​​内部版本号可以在 pubspec.yaml 1.1.5+10 中使用我的版本
然而,10 总是恢复为 1。这是在 info.plist 中正确设置的

  <key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
但是当我打开 xcode v12.2 时它正在改变 $(FLUTTER_BUILD_NUMBER)回到
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
不知何故,xcode 本身正在恢复 info.plist 中的这些更改。 enter image description here
[✓] Flutter (Channel stable, 1.22.2, on Mac OS X 10.15.7 19H2, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[!] Android Studio (version 4.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available

最佳答案

ios/Runner.xcodeproj/project.pbxproj文件有问题
我用这个解决了
update my version and build number

change this:

CURRENT_PROJECT_VERSION = your buildnumber
MARKETING_VERSION = your version


到:

CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)";

关于Flutter 不使用来自 pubspec.yaml 的内部版本号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65277520/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com