构建 Flutter iOS 应用程序时如何解决“格式错误的项目”构建错误

Posted

技术标签:

【中文标题】构建 Flutter iOS 应用程序时如何解决“格式错误的项目”构建错误【英文标题】:How to resolve a "malformed project" build error when building a Flutter iOS app 【发布时间】:2021-05-13 14:02:39 【问题描述】:

我接手了一个项目,发现自己面临这个问题。我该如何解决?:

文件参考 “Objective-C/TOCropViewController/Models/TOActivityCroppedImageProvider.h” 是多个组的成员(“TOCropViewController”和 "TOCropViewController");这表明项目格式不正确。只有 其中一个组的成员资格将被保留(但 目标不受影响)。如果你想引用同一个文件 在多个组中,请添加对同一路径的另一个引用。

Launching lib/main.dart on iPhone de Eric in debug mode...
Automatically signing ios for device deployment using specified development team in Xcode project: 7ZM5A78359
Running pod install...
Running Xcode build...
Xcode build done.                                           33,0s
Failed to build iOS app
Error output from Xcode build:
↳
    2021-05-13 14:35:48.251 xcodebuild[47387:355803] warning:  The file reference for "Objective-C/TOCropViewController/Models/TOActivityCroppedImageProvider.h" is a member of multiple groups ("TOCropViewController" and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-05-13 14:35:48.251 xcodebuild[47387:355803] warning:  The file reference for "Objective-C/TOCropViewController/Views/TOCropOverlayView.h" is a member of multiple groups ("TOCropViewController" and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-05-13 14:35:48.251 xcodebuild[47387:355803] warning:  The file reference for "Objective-C/TOCropViewController/Models/TOCroppedImageAttributes.h" is a member of multiple groups ("TOCropViewController" and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-05-13 14:35:48.251 xcodebuild[47387:355803] warning:  The file reference for "Objective-C/TOCropViewController/Views/TOCropScrollView.h" is a member of multiple groups ("TOCropViewController" and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-05-13 14:35:48.251 xcodebuild[47387:355803] warning:  The file reference for "Objective-C/TOCropViewController/Views/TOCropToolbar.h" is a member of multiple groups ("TOCropViewController" and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-05-13 14:35:48.251 xcodebuild[47387:355803] warning:  The file reference for "Objective-C/TOCropViewController/Views/TOCropView.h" is a member of multiple groups ("TOCropViewController" and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-05-13 14:35:48.251 xcodebuild[47387:355803] warning:  The file reference for "Objective-C/TOCropViewController/TOCropViewController.h" is a member of multiple groups ("TOCropViewController" and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-05-13 14:35:48.251 xcodebuild[47387:355803] warning:  The file reference for "Objective-C/TOCropViewController/Models/TOCropViewControllerTransitioning.h" is a member of multiple groups ("TOCropViewController" and "TOCropViewController"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:66013:32: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
        rc = defragmentPage(pPage, MIN(4, pPage->nFree - (2+nByte)));
                                   ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:215:9: note: expanding this definition of 'MIN'
    #define MIN(a, b) (((a)<(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14248:10: note: other definition of 'MIN'
    # define MIN(A,B) ((A)<(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:66737:43: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro]
          char *zFullPathname = sqlite3Malloc(MAX(nFullPathname,nFilename));
                                              ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:218:9: note: expanding this definition of 'MAX'
    #define MAX(a, b) (((a)>(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14251:10: note: other definition of 'MAX'
    # define MAX(A,B) ((A)>(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:69397:11: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro]
        amt = MAX(0, (int)(pCur->pPage->aDataEnd - pCur->info.pPayload));
              ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:218:9: note: expanding this definition of 'MAX'
    #define MAX(a, b) (((a)>(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14251:10: note: other definition of 'MAX'
    # define MAX(A,B) ((A)>(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:71527:16: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
        int nAdd = MIN(nNew,iOld-iNew);
                   ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:215:9: note: expanding this definition of 'MIN'
    #define MIN(a, b) (((a)<(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14248:10: note: other definition of 'MIN'
    # define MIN(A,B) ((A)<(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:73098:24: warning: implicit conversion loses integer precision: 'const sqlite3_int64' (aka 'const long long') to 'int' [-Wshorten-64-to-32]
            x2.nData = pX->nKey;
                     ~ ~~~~^~~~
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:75112:21: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
      const int nCopy = MIN(nSrcPgsz, nDestPgsz);
                        ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:215:9: note: expanding this definition of 'MIN'
    #define MIN(a, b) (((a)<(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14248:10: note: other definition of 'MIN'
    # define MIN(A,B) ((A)<(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:75386:18: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
              iEnd = MIN(PENDING_BYTE + pgszDest, iSize);
                     ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:215:9: note: expanding this definition of 'MIN'
    #define MIN(a, b) (((a)<(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14248:10: note: other definition of 'MIN'
    # define MIN(A,B) ((A)<(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:76760:49: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro]
        if( sqlite3VdbeMemClearAndResize(pMem, (int)MAX(nAlloc,32)) )
                                                    ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:218:9: note: expanding this definition of 'MAX'
    #define MAX(a, b) (((a)>(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14251:10: note: other definition of 'MAX'
    # define MAX(A,B) ((A)>(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:82139:22: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
              int nCmp = MIN(mem1.n, pRhs->n);
                         ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:215:9: note: expanding this definition of 'MIN'
    #define MIN(a, b) (((a)<(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14248:10: note: other definition of 'MIN'
    # define MIN(A,B) ((A)<(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:82167:22: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
              int nCmp = MIN(nStr, pRhs->n);
                         ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:215:9: note: expanding this definition of 'MIN'
    #define MIN(a, b) (((a)<(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14248:10: note: other definition of 'MIN'
    # define MIN(A,B) ((A)<(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:82356:12: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
        nCmp = MIN( pPKey2->aMem[0].n, nStr );
               ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:215:9: note: expanding this definition of 'MIN'
    #define MIN(a, b) (((a)<(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14248:10: note: other definition of 'MIN'
    # define MIN(A,B) ((A)<(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:84362:42: warning: implicit conversion loses integer precision: 'sqlite3_uint64' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32]
        rc = sqlite3_bind_zeroblob(pStmt, i, n);
             ~~~~~~~~~~~~~~~~~~~~~           ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:88296:21: warning: implicit conversion loses integer precision: 'i64' (aka 'long long') to 'int' [-Wshorten-64-to-32]
        pOut->u.nZero = nZero;
                      ~ ^~~~~
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:94211:28: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro]
          sqlite3_int64 nNew = MAX(128, 2*(sqlite3_int64)p->nAlloc);
                               ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:218:9: note: expanding this definition of 'MAX'
    #define MAX(a, b) (((a)>(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14251:10: note: other definition of 'MAX'
    # define MAX(A,B) ((A)>(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:94215:19: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32]
          p->nAlloc = nNew;
                    ~ ^~~~
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:94491:25: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
      res = memcmp(v1, v2, (MIN(n1, n2) - 13)/2);
                            ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:215:9: note: expanding this definition of 'MIN'
    #define MIN(a, b) (((a)<(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14248:10: note: other definition of 'MIN'
    # define MIN(A,B) ((A)<(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:94673:17: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
          mxCache = MIN(mxCache, SQLITE_MAX_PMASZ);
                    ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:215:9: note: expanding this definition of 'MIN'
    #define MIN(a, b) (((a)<(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14248:10: note: other definition of 'MIN'
    # define MIN(A,B) ((A)<(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:94674:28: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro]
          pSorter->mxPmaSize = MAX(pSorter->mnPmaSize, (int)mxCache);
                               ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:218:9: note: expanding this definition of 'MAX'
    #define MAX(a, b) (((a)>(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14251:10: note: other definition of 'MAX'
    # define MAX(A,B) ((A)>(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:95506:45: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
            iListOff = (u8*)pSorter->list.pList - pSorter->list.aMemory;
                     ~ ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:95517:26: warning: implicit conversion loses integer precision: 'sqlite3_int64' (aka 'long long') to 'int' [-Wshorten-64-to-32]
          pSorter->nMemory = nNew;
                           ~ ^~~~
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:95671:19: warning: ambiguous expansion of macro 'MAX' [-Wambiguous-macro]
        pIncr->mxSz = MAX(pTask->pSorter->mxKeysize+9,pTask->pSorter->mxPmaSize/2);
                      ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:218:9: note: expanding this definition of 'MAX'
    #define MAX(a, b) (((a)>(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14251:10: note: other definition of 'MAX'
    # define MAX(A,B) ((A)>(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:96124:21: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
              nReader = MIN(pTask->nPMA - i, SORTER_MAX_MERGE_COUNT);
                        ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/usr/include/sys/param.h:215:9: note: expanding this definition of 'MIN'
    #define MIN(a, b) (((a)<(b))?(a):(b))
            ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:14248:10: note: other definition of 'MIN'
    # define MIN(A,B) ((A)<(B)?(A):(B))
             ^
    /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:96980:17: warning: ambiguous expansion of macro 'MIN' [-Wambiguous-macro]
        int nCopy = MIN(nRead, (p->nChunkSize - iChunkOffset));
                    ^
    In module 'Darwin' imported from /Users/splitti1/Projects/wiikko/ios/Pods/sqlite3/sqlite-amalgamation-3320300/sqlite3.c:1074:
    
             ^
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'share' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'path_provider' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'package_info' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'nanopb' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'keyboard_utils' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'image_picker' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'image_downloader' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'firebase_messaging' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'image_cropper' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'flutter_custom_dialog' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase: /Users/splitti1/Projects/wiikko/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Models/TOActivityCroppedImageProvider.h (in target 'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase: /Users/splitti1/Projects/wiikko/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Views/TOCropOverlayView.h (in target 'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase: /Users/splitti1/Projects/wiikko/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Models/TOCroppedImageAttributes.h (in target 'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase: /Users/splitti1/Projects/wiikko/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Views/TOCropScrollView.h (in target 'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase: /Users/splitti1/Projects/wiikko/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Views/TOCropToolbar.h (in target 'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase: /Users/splitti1/Projects/wiikko/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Views/TOCropView.h (in target 'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase: /Users/splitti1/Projects/wiikko/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/TOCropViewController.h (in target 'TOCropViewController' from project 'Pods')
    warning: Skipping duplicate build file in Copy Headers build phase: /Users/splitti1/Projects/wiikko/ios/Pods/TOCropViewController/Objective-C/TOCropViewController/Models/TOCropViewControllerTransitioning.h (in target 'TOCropViewController' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Runner' from project 'Runner')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Protobuf' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleUtilities' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleDataTransport' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseMessaging' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseInstanceID' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseInstallations' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseCore' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FMDB' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleAppMeasurement' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Firebase' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseAnalytics' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flutter' from project 'Pods')

Could not build the precompiled application for the device.

Error launching application on iPhone de Eric.

颤振医生

[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H2 darwin-x64, locale
    fr-CD)
    • Flutter version 1.22.5 at /Users/splitti1/Development/flutter
    • Framework revision 7891006299 (5 months ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/splitti1/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
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

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

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[!] VS Code (version 1.56.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • iPhone de Eric (mobile)    • 1a046776b311b2ca3539147a23be1abc00ce4dee •
      ios • iOS 12.5.2
    • iPhone 12 Pro Max (mobile) • 4C0D6598-33D1-46B3-8871-9EEC509C33F4     •
      ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)

! Doctor found issues in 2 categories.

【问题讨论】:

【参考方案1】:

我通过录音解决了这个问题

flutter pub cache repair
flutter clean
flutter run

【讨论】:

以上是关于构建 Flutter iOS 应用程序时如何解决“格式错误的项目”构建错误的主要内容,如果未能解决你的问题,请参考以下文章

Flutter:iOS 构建失败

Flutter:该应用程序不是为 iOS 构建的

Flutter 构建 iOS 错误:在 iOS 设备中构建 Flutter 应用程序时遇到错误

如何使用 fastlane 缩短 Flutter iOS 应用的构建时间

用于测试的 Flutter ios 构建

从 Windows 10 构建发布 Flutter ios 应用程序