首页 > 解决方案 > Flutter Compiler 错误消息 pod files 错误

问题描述

我只是颤振的新手,当我尝试构建应用程序时,它一直给我这个错误

Launching lib/main.dart on iPhone Xʀ in debug mode...


Compiler message:
../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/dio-2.2.2/lib/src/dio_http_headers.dart:55:8: Error: The method 'DioHttpHeaders.add' has
fewer named arguments than those of overridden method 'HttpHeaders.add'.
void add(String name, value) {
   ^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:694:8: Context: This is the overridden method ('add').
void add(String name, Object value,
   ^
../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/dio-2.2.2/lib/src/dio_http_headers.dart:70:8: Error: The method 'DioHttpHeaders.set' has
fewer named arguments than those of overridden method 'HttpHeaders.set'.
void set(String name, Object value) {
   ^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:703:8: Context: This is the overridden method ('set').
void set(String name, Object value,
   ^


Upgrading project.pbxproj                   
Running pod install...                                                  
2912.0s (!)    


Warning: Podfile is out of date
This can cause a mismatched version of Flutter to be embedded in your app, which may result in App Store submission rejection or crashes.
If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/24641 for instructions.
To regenerate the Podfile, run:
rm iOS/Podfile


Running Xcode build...                                                  
                                               
Xcode build done.                                           160.7s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **

Xcode's output:
↳
1 warning generated.
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.m:19:10: warning: non-portable
 path to file '<protobuf/Type.pbobjc.h>'; specified path differs in case from file name on  disk [-Wnonportable-include-path]
 #import <Protobuf/Type.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Type.pbobjc.h>
 /Users/haptome/Downloads/musicfile2- mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.m:20:10: warning: non-portable
path to file '<protobuf/Any.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Any.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Any.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/Type.pbobjc.m:21:10: warning: non-portable
path to file '<protobuf/SourceContext.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/SourceContext.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/SourceContext.pbobjc.h>
3 warnings generated.
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/Timestamp.pbobjc.m:17:10: warning:
non-portable path to file '<protobuf/Timestamp.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Timestamp.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Timestamp.pbobjc.h>

3 warnings generated.
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/FieldMask.pbobjc.m:17:10: warning:
non-portable path to file '<protobuf/FieldMask.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/FieldMask.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/FieldMask.pbobjc.h>
1 warning generated.
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/Empty.pbobjc.m:17:10: warning: non-portable
path to file '<protobuf/Empty.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Empty.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Empty.pbobjc.h>
1 warning generated.
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/Duration.pbobjc.m:17:10: warning: non-portable
path to file '<protobuf/Duration.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Duration.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Duration.pbobjc.h>
1 warning generated.
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.m:17:10: warning: non-portable path
to file '<protobuf/Api.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Api.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Api.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.m:18:10: warning: non-portable path
to file '<protobuf/SourceContext.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/SourceContext.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/SourceContext.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/Api.pbobjc.m:19:10: warning: non-portable path
to file '<protobuf/Type.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Type.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Type.pbobjc.h>
3 warnings generated.
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/google/protobuf/Any.pbobjc.m:17:10: warning: non-portable path
to file '<protobuf/Any.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Any.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Any.pbobjc.h>
1 warning generated.
In file included from /Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.m:26:
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.h:328:19: warning: empty paragraph
passed to '@param' command [-Wdocumentation]
 @param sharedStyle
 ~~~~~~~~~~~~~~~~~^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.h:343:25: warning: empty paragraph
passed to '@param' command [-Wdocumentation]
 @param allowTapToDismiss
 ~~~~~~~~~~~~~~~~~~~~~~~^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.h:343:9: warning: parameter
'allowTapToDismiss' not found in the function declaration [-Wdocumentation]
 @param allowTapToDismiss
        ^~~~~~~~~~~~~~~~~
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.h:343:9: note: did you mean
'tapToDismissEnabled'?
 @param allowTapToDismiss
        ^~~~~~~~~~~~~~~~~
        tapToDismissEnabled
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.h:362:20: warning: empty paragraph
passed to '@param' command [-Wdocumentation]
 @param queueEnabled
 ~~~~~~~~~~~~~~~~~~^
4 warnings generated.
In file included from /Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/FluttertoastPlugin.m:2:
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.h:328:19: warning: empty paragraph
passed to '@param' command [-Wdocumentation]
 @param sharedStyle
 ~~~~~~~~~~~~~~~~~^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.h:343:25: warning: empty paragraph
passed to '@param' command [-Wdocumentation]
 @param allowTapToDismiss
 ~~~~~~~~~~~~~~~~~~~~~~~^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.h:343:9: warning: parameter
'allowTapToDismiss' not found in the function declaration [-Wdocumentation]
 @param allowTapToDismiss
        ^~~~~~~~~~~~~~~~~
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.h:343:9: note: did you mean
'tapToDismissEnabled'?
 @param allowTapToDismiss
        ^~~~~~~~~~~~~~~~~
        tapToDismissEnabled
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.h:362:20: warning: empty paragraph
passed to '@param' command [-Wdocumentation]
 @param queueEnabled
 ~~~~~~~~~~~~~~~~~~^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/FluttertoastPlugin.m:19:23: warning: unused
variable 'viewController' [-Wunused-variable]
    UIViewController *viewController =
                      ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/FluttertoastPlugin.m:70:21: warning: unused
variable 'topPadding' [-Wunused-variable]
            CGFloat topPadding = window.safeAreaInsets.top;
                    ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/FluttertoastPlugin.m:71:21: warning: unused
variable 'bottomPadding' [-Wunused-variable]
            CGFloat bottomPadding = window.safeAreaInsets.bottom;
                    ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/FluttertoastPlugin.m:48:19: warning: unused
variable 'size' [-Wunused-variable]
        NSNumber *size = call.arguments[@"size"];
                  ^
8 warnings generated.
2 warnings generated.
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:32:18: warning: unused variable 'a'
[-Wunused-variable]
        uint8_t *a = starting_pointer + i + 3;
                 ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:57:18: warning: unused variable 'a'
[-Wunused-variable]
        uint8_t *a = starting_pointer + i + 3;
                 ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:84:12: warning: unused variable
'DEG_TO_RAD' [-Wunused-variable]
    double DEG_TO_RAD = 0.0174532925;
           ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:122:27: warning: variable 'br' may be
uninitialized when used here [-Wconditional-uninitialized]
         r_rep = (r_rep + br) * wr;
                          ^~
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:99:14: note: initialize the variable 'br'
to silence this warning
    double br, bg, bb;
             ^
              = 0.0
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:122:33: warning: variable 'wr' may be
uninitialized when used here [-Wconditional-uninitialized]
         r_rep = (r_rep + br) * wr;
                                ^~
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:100:14: note: initialize the variable 'wr'
to silence this warning
    double wr, wg, wb;
             ^
              = 0.0
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:123:27: warning: variable 'bg' may be
uninitialized when used here [-Wconditional-uninitialized]
         g_rep = (g_rep + bg) * wg;
                          ^~
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:99:18: note: initialize the variable 'bg'
to silence this warning
    double br, bg, bb;
                 ^
                  = 0.0
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:123:33: warning: variable 'wg' may be
uninitialized when used here [-Wconditional-uninitialized]
         g_rep = (g_rep + bg) * wg;
                                ^~
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:100:18: note: initialize the variable 'wg'
to silence this warning
    double wr, wg, wb;
                 ^
                  = 0.0
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:124:27: warning: variable 'bb' may be
uninitialized when used here [-Wconditional-uninitialized]
         b_rep = (b_rep + bb) * wb;
                          ^~
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:99:22: note: initialize the variable 'bb'
to silence this warning
    double br, bg, bb;
                     ^
                      = 0.0
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:124:33: warning: variable 'wb' may be
uninitialized when used here [-Wconditional-uninitialized]
         b_rep = (b_rep + bb) * wb;
                                ^~
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/bitmap-0.0.5/ios/Classes/bitmap.cpp:100:22: note: initialize the variable 'wb'
to silence this warning
    double wr, wg, wb;
                     ^
                      = 0.0
9 warnings generated.
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.3.1/ios/Classes/FlutterDownloaderPlugin.m:73:53: warning:
incompatible pointer types sending 'FlutterEngine *' to parameter of type 'NSObject<FlutterBinaryMessenger> * _Nonnull'
[-Wincompatible-pointer-types]
                                    binaryMessenger:_headlessRunner];
                                                    ^~~~~~~~~~~~~~~
In module 'Flutter' imported from
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.3.1/ios/Classes/FlutterDownloaderPlugin.h:1:
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/.symlinks/flutter/ios/Flutter.framework/Headers/FlutterChannels.h:178:74: note: passing
argument to parameter 'messenger' here
                      binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
                                                                         ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.3.1/ios/Classes/FlutterDownloaderPlugin.m:273:15: warning:
unused variable 'url' [-Wunused-variable]
    NSString *url = dict[KEY_URL];
              ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.3.1/ios/Classes/FlutterDownloaderPlugin.m:863:52: warning:
incompatible pointer types sending 'NSURLSessionTask *' to parameter of type 'NSURLSessionDownloadTask *' [-Wincompatible-pointer-types]
        NSString *taskId = [self identifierForTask:task ofSession:session];
                                                   ^~~~
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.3.1/ios/Classes/FlutterDownloaderPlugin.m:160:60: note:
passing argument to parameter 'task' here
- (NSString*)identifierForTask:(NSURLSessionDownloadTask*) task ofSession:(NSURLSession *)session
                                                           ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_downloader-1.3.1/ios/Classes/FlutterDownloaderPlugin.m:904:51: warning:
block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
                    localNotification.alertBody = _allFilesDownloadedMsg;
                                                  ^
                                                  self->
4 warnings generated.
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.7/ios/Classes/GoogleSignInPlugin.m:137:41: warning:
'UIApplicationOpenURLOptionsSourceApplicationKey' is only available on iOS 9.0 or newer [-Wunguarded-availability]
  NSString *sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey];
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'UIKit' imported from /Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Target Support
Files/google_sign_in/google_sign_in-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UI
Kit.framework/Headers/UIApplication.h:518:51: note: 'UIApplicationOpenURLOptionsSourceApplicationKey' has been marked as being introduced in iOS
9.0 here, but the deployment target is iOS 8.0.0
UIKIT_EXTERN UIApplicationOpenURLOptionsKey const UIApplicationOpenURLOptionsSourceApplicationKey NS_SWIFT_NAME(sourceApplication)
API_AVAILABLE(ios(9.0));   // value is an NSString containing the bundle ID of the originating application; non-nil if the originating
application and this application share the same team identifier
                                                  ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.7/ios/Classes/GoogleSignInPlugin.m:137:41: note: enclose
'UIApplicationOpenURLOptionsSourceApplicationKey' in an @available check to silence this warning
  NSString *sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey];
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.7/ios/Classes/GoogleSignInPlugin.m:138:27: warning:
'UIApplicationOpenURLOptionsAnnotationKey' is only available on iOS 9.0 or newer [-Wunguarded-availability]
  id annotation = options[UIApplicationOpenURLOptionsAnnotationKey];
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'UIKit' imported from /Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Target Support
Files/google_sign_in/google_sign_in-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk/System/Library/Frameworks/UI
Kit.framework/Headers/UIApplication.h:519:51: note: 'UIApplicationOpenURLOptionsAnnotationKey' has been marked as being introduced in iOS 9.0
here, but the deployment target is iOS 8.0.0
UIKIT_EXTERN UIApplicationOpenURLOptionsKey const UIApplicationOpenURLOptionsAnnotationKey NS_SWIFT_NAME(annotation) API_AVAILABLE(ios(9.0));
// value is a property-list typed object corresponding to what the originating application passed in UIDocumentInteractionController's annotation
property
                                                  ^
/Users/haptome/Library/flutter/.pub-cache/hosted/pub.dartlang.org/google_sign_in-4.0.7/ios/Classes/GoogleSignInPlugin.m:138:27: note: enclose
'UIApplicationOpenURLOptionsAnnotationKey' in an @available check to silence this warning
  id annotation = options[UIApplicationOpenURLOptionsAnnotationKey];
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
While building module 'Protobuf' imported from
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/FirebaseMessaging/Firebase/Messaging/Protos/GtalkExtensions.pbobjc.m:27:
In file included from <module-includes>:1:
In file included from /Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Target Support Files/Protobuf/Protobuf-umbrella.h:28:
In file included from /Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:44:
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBWellKnownTypes.h:40:10: warning: non-portable path to file
'<protobuf/Any.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Any.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Any.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBWellKnownTypes.h:41:10: warning: non-portable path to file
'<protobuf/Duration.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Duration.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Duration.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBWellKnownTypes.h:42:10: warning: non-portable path to file
'<protobuf/Timestamp.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Timestamp.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Timestamp.pbobjc.h>
While building module 'Protobuf' imported from
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/FirebaseMessaging/Firebase/Messaging/Protos/GtalkExtensions.pbobjc.m:27:
In file included from <module-includes>:1:
In file included from /Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Target Support Files/Protobuf/Protobuf-umbrella.h:28:
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:55:10: warning: non-portable path to file
'<protobuf/Any.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Any.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Any.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:56:10: warning: non-portable path to file
'<protobuf/Api.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Api.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Api.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:57:10: warning: non-portable path to file
'<protobuf/Duration.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Duration.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Duration.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:58:10: warning: non-portable path to file
'<protobuf/Empty.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Empty.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Empty.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:59:10: warning: non-portable path to file
'<protobuf/FieldMask.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/FieldMask.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/FieldMask.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:60:10: warning: non-portable path to file
'<protobuf/SourceContext.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/SourceContext.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/SourceContext.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:61:10: warning: non-portable path to file
'<protobuf/Struct.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Struct.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Struct.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:62:10: warning: non-portable path to file
'<protobuf/Timestamp.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Timestamp.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Timestamp.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:63:10: warning: non-portable path to file
'<protobuf/Type.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Type.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Type.pbobjc.h>
/Users/haptome/Downloads/musicfile2-mainfile/musicapp/ios/Pods/Protobuf/objectivec/GPBProtocolBuffers.h:64:10: warning: non-portable path to file
'<protobuf/Wrappers.pbobjc.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
 #import <Protobuf/Wrappers.pbobjc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
         <protobuf/Wrappers.pbobjc.h>
13 warnings generated.
13 warnings generated.

Compiler message:
../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/dio-2.2.2/lib/src/dio_http_headers.dart:55:8: Error: The method 'DioHttpHeaders.add'
has fewer named arguments than those of overridden method 'HttpHeaders.add'.
  void add(String name, value) {
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:694:8: Context: This is the overridden method ('add').
  void add(String name, Object value,
       ^
../../../Library/flutter/.pub-cache/hosted/pub.dartlang.org/dio-2.2.2/lib/src/dio_http_headers.dart:70:8: Error: The method 'DioHttpHeaders.set'
has fewer named arguments than those of overridden method 'HttpHeaders.set'.
  void set(String name, Object value) {
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:703:8: Context: This is the overridden method ('set').
  void set(String name, Object value,
       ^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured
correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')
warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured
correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')

Could not build the application for the simulator.
Error launching application on iPhone Xʀ.

我试过了

rm ios/Podfile 

flutter run
     

但它给了我和上面一样的错误,我尝试了很多东西,但它仍然需要工作。有人知道可能导致问题的原因吗?也许是因为它是在 iOS 上运行的。所以请帮我解决这个问题。

提前致谢!

标签: flutterdartpodfile

解决方案


请试试这个:</p>

步骤1 :

确保你的 Flutter 版本

例如:1.22

第2步 :

在以下位置找到最新的 dio pub 版本:https ://pub.dev/

例如:3.x

第 3 步:

检查项目中的 pubspec.yaml 文件

查找 dio 并检查版本

第4步 :

如果您的 pubspec.yaml 文件 dio 版本不匹配。

编辑您的 pubspec.yaml dio 版本

前任 :

dio : ^3.0.0

第 5 步:

在 Flutter 项目路径终端中运行它

flutter pub upgrade

完毕 !

它对我有用


推荐阅读