flutter ios 应用程序在 xcode 上运行但不会在 vscode 和 android studio 上运行

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

我的应用程序在 android 和 ios 上完美运行(仅使用 xcode)。出于某种原因,当我使用 vsCode 或 Android studio 运行它时,它返回一个错误。

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Xcode build done.                                           1206.8s
Failed to build iOS app
Error output from Xcode build:
↳
    2021-07-13 18:28:30.237 XCBBuildService[1870:62140] Failed to remove: /Users/macUser/Library/Developer/Xcode/DerivedData/Runner-eexwsmocuanrnufgsdyvbcjnzgqw/Build/Intermediates.noindex/XCBuildData/c98de69306103c117579f3f2cbe3019a-desc.xcbuild: unlink(/Users/macUser/Library/Developer/Xcode/DerivedData/Runner-eexwsmocuanrnufgsdyvbcjnzgqw/Build/Intermediates.noindex/XCBuildData/c98de69306103c117579f3f2cbe3019a-desc.xcbuild): No such file or directory (2)
    ** BUILD FAILED **
Xcode's output:
↳
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc:34:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/writing.cc:21:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/context_list.h:26:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/internal.h:109:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_chttp2_ping_queue
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/internal.h:110:52: note: type is not C-compatible due to this default member initializer
      grpc_closure_list lists[GRPC_CHTTP2_PCL_COUNT] = {};
                                                       ^~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/ext/transport/chttp2/transport/internal.h:112:3: note: type is given name 'grpc_chttp2_ping_queue' for linkage purposes by this typedef declaration
    } grpc_chttp2_ping_queue;
      ^
    1 warning generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/tls/tls_security_connector.cc:21:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/tls/tls_security_connector.h:25:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/context/security_context.h:28:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/tls/tls_security_connector.cc:32:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/credentials/ssl/ssl_credentials.h:25:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/ssl/ssl_security_connector.h:60:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_ssl_server_config
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/ssl/ssl_security_connector.h:61:51: note: type is not C-compatible due to this default member initializer
      tsi_ssl_pem_key_cert_pair* pem_key_cert_pairs = nullptr;
                                                      ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/security_connector/ssl/ssl_security_connector.h:66:3: note: type is given name 'grpc_ssl_server_config' for linkage purposes by this typedef declaration
    } grpc_ssl_server_config;
      ^
    2 warnings generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/credentials/tls/tls_credentials.cc:21:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/credentials/tls/tls_credentials.h:26:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/server/secure_server_credentials.cc:26:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/common/secure_auth_context.h:25:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/context/security_context.h:28:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/client/secure_credentials.cc:19:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/client/secure_credentials.h:29:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/common/secure_create_auth_context.cc:24:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/common/secure_auth_context.h:25:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/context/security_context.h:28:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/common/secure_auth_context.cc:19:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/common/secure_auth_context.h:25:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/context/security_context.h:28:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/server/secure_server_credentials.cc:26:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/common/secure_auth_context.h:25:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/context/security_context.h:28:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/client/secure_credentials.cc:19:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/client/secure_credentials.h:29:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/common/secure_create_auth_context.cc:24:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/common/secure_auth_context.h:25:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/context/security_context.h:28:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/common/secure_auth_context.cc:19:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/cpp/common/secure_auth_context.h:25:
    In file included from /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/context/security_context.h:28:
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    typedef struct {
                  ^
                   grpc_credentials_mdelem_array
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this default member initializer
      grpc_mdelem* md = nullptr;
                        ^~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/gRPC-C++/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration
    } grpc_credentials_mdelem_array;
      ^
    1 warning generated.
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/FirebaseFirestore/Firestore/Source/API/FIRLoadBundleTask.mm:41:29: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'NSInteger' (aka 'int') [-Wshorten-64-to-32]
        _bytesLoaded = progress.bytes_loaded();
                     ~ ~~~~~~~~~^~~~~~~~~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/FirebaseFirestore/Firestore/Source/API/FIRLoadBundleTask.mm:43:28: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'NSInteger' (aka 'int') [-Wshorten-64-to-32]
        _totalBytes = progress.total_bytes();
                    ~ ~~~~~~~~~^~~~~~~~~~~~~
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/FirebaseFirestore/Firestore/Source/API/FIRLoadBundleTask.mm:97:17: warning: implicit conversion loses integer precision: 'firebase::firestore::api::LoadBundleTask::LoadBundleHandle' (aka 'long long') to 'FIRLoadBundleObserverHandle' (aka 'int') [-Wshorten-64-to-32]
      return _task->Observe(std::move(core_observer));
      ~~~~~~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3 warnings generated.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'FMDB' from project 'Pods')
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'BoringSSL-GRPC' from project 'Pods')
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'leveldb-library' from project 'Pods')
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'abseil' from project 'Pods')
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'AppAuth' from project 'Pods')
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'gRPC-Core' from project 'Pods')
    /Users/macUser/Work/Mazaya/mazaya/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'gRPC-C++' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)

这是我运行 flutter doctor -v 时得到的结果

flutter doctor -v
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en-BH)
    • Flutter version 2.2.3 at /Users/alialqallaf/Developer/flutter
    • Framework revision f4abaa0735 (12 days ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/alialqallaf/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] IntelliJ IDEA Community Edition (version 2021.1.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.58.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.24.0

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114

• No issues found!

这是我的 pubspec.yaml 文件

name: mazaya
description: A new Flutter project.

publish_to: 'none' # Remove this line if you wish to publish to pub.
version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  apple_sign_in_safety: ^0.0.6
  cached_network_image: ^3.0.0
  carousel_pro: ^1.0.0
  cloud_firestore: ^2.2.0
  cupertino_icons: ^1.0.2
  firebase_auth: ^1.2.0
  firebase_core: ^1.2.0
  firebase_crashlytics: ^2.0.7
  firebase_storage: ^8.1.0
  flutter_svg: ^0.22.0
  get: ^4.1.4
  google_sign_in: ^5.0.3
  intl: ^0.17.0
  modal_progress_hud_nsn: ^0.1.0-nullsafety-1
  pdf: ^3.3.0
  percent_indicator: ^3.0.1
  responsive_framework: ^0.1.0
  share_plus: ^2.1.2
  url_launcher: ^6.0.8

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_launcher_icons: ^0.9.0
  flutter_native_splash: ^1.1.8+4

flutter_icons:
  android: true
  ios: true
  image_path: "assets/dev/mazaya.png"
  adaptive_icon_background: "#FFFFFF"
  adaptive_icon_foreground: "assets/dev/mazaya_adaptive.png"

flutter_native_splash:
  color: "#FFFFFF"
  image: "assets/dev/splash.png"
  android: true
  ios: true

flutter:
  uses-material-design: true

  assets:
    - assets/svg/
    - assets/images/
  fonts:
    - family: OpenSans
      fonts:
        - asset: assets/fonts/OpenSans-Regular.ttf
        - asset: assets/fonts/OpenSans-Bold.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

我尝试了很多解决方案,例如

rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ios/Pods  
rm ios/Podfile 
sudo xattr -r -d com.apple.FinderInfo .   
flutter pub cache repair 
rm ios/Flutter/Flutter.podspec  
pod deintegrate && rm Podfile.lock && pod install  
flutter clean

我还把频道从主频道换成了稳定频道,但都没有用。 谁能帮帮我吗?

xcode flutter dart
4个回答
2
投票

问题已解决!

我在 Xcode 上更改了项目的配置,如下图所示

我的图片来自:https://github.com/flutter/flutter/issues/56085#issuecomment-645088488


0
投票
/Users/macUser/Work/Mazaya/mazaya/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'FMDB' from project 'Pods')

这是有问题的部分 转到您的 Pod 文件并将目标更改为 9 或更高 在 platform :iOS, 9.0 作为我图片的第一行改变


0
投票

谢谢 Ali Alqallaf
在 Xcode 中更改 info->Release->Runner->Pods-Runner.release 为 Release
我的APP可以在Android Studio中运行

choise Release not Pods-runner


0
投票

确保项目不在 Onedrive 文件夹中。这会导致项目无法正常运行。

Github问题

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