为新下载的 iOS 应用程序存储库运行“flutter build ios”时出错:“未找到成员:'minimumButonWidth'”

问题描述 投票:0回答:1

我已经下载了一个已经有一段时间没有维护的应用程序的存储库,并且我正在尝试运行“$ flutter run(带有其他标志)”,但由于出现以下错误,之后无法成功构建升级并解决我所有其他依赖项:

joeyzhu@Joeys-MacBook-Pro ios % flutter build ios --flavor development --dart-define=MODE=development
Changing current working directory to: /Users/joeyzhu/Documents/GitHub/Customer-App
Building com.customer.JustGoDelivery.justGo for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: XXXXXXXXXX
Running pod install...                                              3.2s
Running Xcode build...                                                  
Xcode build done.                                           71.6s
Failed to build iOS app
Error (Xcode): ../../../.pub-cache/hosted/pub.dev/pay-1.1.0/lib/src/widgets/apple_pay_button.dart:35:38: Error: Member not found: 'minimumButonWidth'.


Encountered error while building for device.

有关我的设置的一些信息:

  • Xcode 15.0
  • 颤振3.13.6
  • Cocoapods 1.13.0
  • VSCode
  • pubspec.yaml:
name: just_go
description: The customer app for JustGo Delivery.

# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

# MAKE SURE THE BUILDNUMBER IS ALWAYS AN INTEGER
version: 2.3.5+218
# INTEGER ONLY  ^


environment:
  sdk: ">=2.17.0 <3.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter
  flutter_localizations: # Add this line
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  http: ^0.13.4
  # For multi language support.
  intl:
  provider: ^6.0.2
  flutter_svg: ^1.0.3
  google_maps_flutter: ^2.1.1
  location: ^4.3.0
  pin_code_fields: ^7.3.0
  shared_preferences: ^2.0.13
  scrollable_positioned_list: ^0.3.2
  flutter_cache_manager: ^3.3.0
  url_launcher: ^6.0.20
  badges: ^2.0.2
  uuid: ^3.0.6
  flutter_stripe: ^3.0.2
  pay: ^1.1.0
  flutter_sticky_header: ^0.6.1
  amplitude_flutter: ^3.8.1
  uni_links: ^0.5.1
  share_plus: ^4.0.4
  sensors_plus: ^1.3.3
  assorted_layout_widgets: ^7.0.0
  # Most recent version of modal_bottom_sheet was broken as of Aug 1 2023,
  # so we're using a specific version that works. In the future this pre versioning can probably be removed since it will be fixed by then
  modal_bottom_sheet: ^3.0.0-pre
  confetti: ^0.7.0

  flutter_yuansfer:
    git:
      url: https://github.com/JustGo-Delivery/Flutter-Yuansfer.git

  flutter_braintree:
    git:
      url: https://github.com/JustGo-Delivery/flutter-braintree.git

  weird_clipboard:
    git:
      url: https://github.com/JustGo-Delivery/Flutter-Weird-Clipboard.git

  carousel_slider:
    git:
      url: https://github.com/JustGo-Delivery/Better-Carousel-Slider.git

  fuzzywuzzy: ^0.2.0
  characters: ^1.2.0
  firebase_core: ^1.18.0
  firebase_core_platform_interface: 4.5.1 # TEMPORARY WORKAROUND!!! TODO remove
  firebase_messaging: ^11.4.2
  flutter_markdown: ^0.6.10+2
  slide_to_confirm: ^1.1.0
  in_app_review: ^2.0.4
  package_info_plus: ^4.0.2
  dotted_border: ^2.0.0+2
  fluwx: ^3.9.0
  async: ^2.8.2
  path_to_regexp: ^0.4.0
  pdfx: ^2.3.0
  collection: ^1.16.0
#      ref: main # branch name

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: "^0.9.2"
  flutter_lints: ^2.0.1

flutter_icons:
  ios: true
  android: true
  image_path: "assets/app_icons/development/ios.png"
  adaptive_icon_background: "assets/app_icons/development/android_background.png"
  adaptive_icon_foreground: "assets/app_icons/development/android_foreground.png"
  remove_alpha_ios: true

  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^1.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:
  # For-multi language support.
  generate: true
  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
  - assets/pictures/initial_launch_banner0.jpg
  - assets/pictures/initial_launch_banner3.png
  - assets/branding/green_full_logo.png
  - assets/branding/svg_full_logo.svg
  - assets/icons/location.png
  - assets/icons/plus_icon.svg
  - assets/icons/minus_icon.svg
  - assets/icons/support_icon.svg
  - assets/icons/search_icon.svg
  - assets/icons/clock_icon.svg
  - assets/icons/home_icon.svg
  - assets/icons/cart_icon.svg
  - assets/icons/account_icon.svg
  - assets/icons/order_history_icon.svg
  - assets/icons/favorites_icon.svg
  - assets/icons/referral_icon.svg
  - assets/icons/preorder_only.png
  - assets/miscellaneous/payment_option_icons/AliPay.svg
  - assets/miscellaneous/payment_option_icons/ApplePay.svg
  - assets/miscellaneous/payment_option_icons/Card_Pay.svg
  - assets/miscellaneous/payment_option_icons/GooglePay.svg
  - assets/miscellaneous/payment_option_icons/WeChat.svg
  - assets/miscellaneous/payment_option_icons/PayPal.svg
  - assets/miscellaneous/payment_option_icons/Venmo.svg
  - assets/payment/production_google_pay_payment_profile.json
  - assets/payment/test_google_pay_payment_profile.json
  - assets/app_icons/production/ios.png
  - assets/illustrations/referral_gift.svg
  - assets/miscellaneous/food/usda_organic.svg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: header
      fonts:
        - asset: fonts/title_font.otf
    - family: metropolis
      fonts:
        - asset: fonts/metropolis/Black.ttf
        - asset: fonts/metropolis/BlackItalic.ttf
        - asset: fonts/metropolis/Bold.ttf
        - asset: fonts/metropolis/BoldItalic.ttf
        - asset: fonts/metropolis/ExtraBold.ttf
        - asset: fonts/metropolis/ExtraBoldItalic.ttf
        - asset: fonts/metropolis/ExtraLight.ttf
        - asset: fonts/metropolis/ExtraLightItalic.ttf
        - asset: fonts/metropolis/Light.ttf
        - asset: fonts/metropolis/LightItalic.ttf
        - asset: fonts/metropolis/Medium.ttf
        - asset: fonts/metropolis/MediumItalic.ttf
        - asset: fonts/metropolis/Regular.ttf
        - asset: fonts/metropolis/RegularItalic.ttf
        - asset: fonts/metropolis/SemiBold.ttf
        - asset: fonts/metropolis/SemiBoldItalic.ttf
        - asset: fonts/metropolis/Thin.ttf
        - asset: fonts/metropolis/ThinItalic.ttf
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

我已将 Cocoapods 更新到 1.13.0 并使用它来获取我的所有依赖项。 Flutter Doctor 给出以下输出:

[✓] Flutter (Channel stable, 3.13.6, on macOS 13.5 22G74 darwin-arm64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.83.1)
[✓] Connected device (3 available)
[✓] Network resources

我尝试过将付款锁定在一系列不同的版本。在每个不同的版本之间我确保运行

$ flutter clean 
&& flutter pub get 
&& pod install 
&& flutter build ios --flavor development --dart-define=MODE=development

并且每个版本锁定都会给出以下错误:

  • 将 pay 锁定在 1.1.1 到 1.1.2:(本存储库中未使用 pay_android)
Because pay >=1.1.2 depends on pay_android ^1.0.11 and no versions of pay match >1.1.1 <1.1.2, pay >1.1.1 requires pay_android ^1.0.11.
And because pay 1.1.1 depends on pay_android ^1.0.10 which depends on flutter_svg ^2.0.5, pay >=1.1.1 requires flutter_svg ^2.0.5.
So, because just_go depends on both flutter_svg ^1.0.3 and pay ^1.1.1, version solving failed.
  • 将支付锁定在1.0.11至1.1.0:
Error (Xcode): ../../../.pub-cache/hosted/pub.dev/pay-1.0.11/lib/src/widgets/apple_pay_button.dart:33:38: Error: Member not found: 'minimumButonWidth'.
  • 将支付锁定在1.0.10至1.0.9:
Error (Xcode): ../../../.pub-cache/hosted/pub.dev/pay-1.0.10/lib/src/widgets/google_pay_button.dart:31:5: Error: Type 'GooglePayButtonStyle' not found.
  • 我还从 XCode 的 UI 运行运行程序项目并遇到相同的错误。

  • 尝试将 Flutter 降级到 3.7.0;我之前也遇到过类似的错误,降级到 Flutter 3.3.2 解决了所有问题。但这里它搞乱了很多事情,所以我回到了稳定版本。

  • 在我提交之前,可能有重复的内容(在模拟器上运行flutter应用程序时出错)提到使用“$ flutter pub缓存修复”,但这不起作用。

  • 我也对“minimumButonWidth”中的拼写错误感兴趣,以及这是否与版本和依赖性问题有关;我对此表示怀疑,因为我在其他问题中没有发现该变量的任何踪迹。

编辑:包含我的 pubspec.yaml 以获取更多详细信息

ios flutter xcode dart cocoapods
1个回答
0
投票

最小但是t宽度

Google 的人也会犯这样的错误。

© www.soinside.com 2019 - 2024. All rights reserved.