首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法在iOs上启动Android工作室默认的“新颤振项目”

无法在iOs上启动Android工作室默认的“新颤振项目”
EN

Stack Overflow用户
提问于 2022-02-14 20:15:04
回答 1查看 139关注 0票数 0

我最近更新了我的系统的多个组件,从那时起,颤振iOS构建不再工作了。

我的计划是找出导致问题的库,我决定从一个干净的新项目开始,然后逐个添加所需的库,直到它失败为止。问题是,我甚至无法在iOs模拟器(或在真正的IPhone上)上启动一个新创建的Android“新颤振项目”。

我在Xcode 13.2.1中添加了签名--没有进一步的更改。

我的系统运行在macOS蒙特利12.2.1上。

当我尝试启动这个“处男”应用程序时,输出是:

代码语言:javascript
运行
复制
Launching lib/main.dart on iPhone 13 in debug mode...
Running Xcode build...
Xcode build done.                                            2.3s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/t1/l4k0xxn13vz_ngc05nvytsb40000gn/T/flutter_tools.Gg1WCD/flutter_ios_build_temp_dirCeOcFZ/temporary_xcresult_bundle

    While building module 'Foundation' imported from /Users/bernhardpiskernik/StudioProjects/test_20220214/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m:1:
    In file included from <module-includes>:1:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:109:12: error: attributes may not be specified on a category
    @interface NSArray<ObjectType> (NSArrayDiffing)
               ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:196:12: error: attributes may not be specified on a category
    @interface NSMutableArray<ObjectType> (NSMutableArrayDiffing)
               ^
    While building module 'Foundation' imported from /Users/bernhardpiskernik/StudioProjects/test_20220214/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m:1:
    In file included from <module-includes>:1:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString
    - (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
                                                             ~~~~~~~~~~~~~~                                                                       ^                  ~
    While building module 'Foundation' imported from /Users/bernhardpiskernik/StudioProjects/test_20220214/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m:1:
    In file included from <module-includes>:1:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
            #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
                                                          ^          ~
    While building module 'Foundation' imported from /Users/bernhardpiskernik/StudioProjects/test_20220214/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m:1:
    In file included from <module-includes>:1:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:49:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSKeyValueCoding.h:8:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:112:12: error: attributes may not be specified on a category
    @interface NSOrderedSet<ObjectType> (NSOrderedSetDiffing)
               ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:185:12: error: attributes may not be specified on a category
    @interface NSMutableOrderedSet<ObjectType> (NSMutableOrderedSetDiffing)
               ^
    While building module 'Foundation' imported from /Users/bernhardpiskernik/StudioProjects/test_20220214/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m:1:
    In file included from <module-includes>:1:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:56:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSMorphology.h:64:12: error: attributes may not be specified on a category
    @interface NSMorphology (NSCustomPronouns)
               ^
    While building module 'Foundation' imported from /Users/bernhardpiskernik/StudioProjects/test_20220214/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m:1:
    In file included from <module-includes>:1:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:130:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLSession.h:500:168: error: expected ')'
    - (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler;
                                                                                          ^
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLSession.h:500:141: note: to match this '('
    - (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler;
                                                                                          ^
    7 errors generated.
    /Users/bernhardpiskernik/StudioProjects/test_20220214/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m:1:9: fatal error: could not build module 'Foundation'
    #import <Foundation/Foundation.h>
     ~~~~~~~^
    8 errors generated.
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/t1/l4k0xxn13vz_ngc05nvytsb40000gn/T/flutter_tools.Gg1WCD/flutter_ios_build_temp_dirCeOcFZ/temporary_xcresult_bundle


Parse Issue (Xcode): Attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:108:11

Parse Issue (Xcode): Attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:195:11

Semantic Issue (Xcode): Function does not return NSString
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:90:142

Parse Issue (Xcode): Attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:111:11

Parse Issue (Xcode): Attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:184:11

Parse Issue (Xcode): Attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSMorphology.h:63:11

Parse Issue (Xcode): Expected ')'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLSession.h:499:167

Parse Issue (Xcode): Could not build module 'Foundation'
/Users/bernhardpiskernik/StudioProjects/test_20220214/ios/Pods/Target%20Support%20Files/Pods-Runner/Pods-Runner-dummy.m:0:8

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

颤振医生-v返回:

代码语言:javascript
运行
复制
[✓] Flutter (Channel stable, 2.10.1, on macOS 12.2.1 21D62 darwin-x64, locale en-AT)
    • Flutter version 2.10.1 at /Users/bernhardpiskernik/Library/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db747aa133 (5 days ago), 2022-02-09 13:57:35 -0600
    • Engine revision ab46186b24
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/bernhardpiskernik/Library/Android/sdk/
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

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

[✓] Android Studio (version 2021.1)
    • 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.11+0-b60-7590822)

[✓] Connected device (2 available)
    • iPhone 13 (mobile) • 32762AE5-1FA2-428D-98DD-998153C83A7E • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 98.0.4758.80

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

我遗漏了什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-06 19:38:44

结果,我在我的conda基础环境中更新了导致这个问题的东西。

一个conda deactivate就足以成功地实现run flutter

要使run按钮再次工作,我必须禁用conda基本环境的自动启动,方法是在.zshrc中的conda块之后添加.zshrc并重新启动MacBook。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71117765

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档