首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我的Flutter应用程序拒绝在IOS模拟器上运行

我的Flutter应用程序拒绝在IOS模拟器上运行
EN

Stack Overflow用户
提问于 2021-05-08 04:12:11
回答 1查看 370关注 0票数 2

当我尝试在M1 mac上的ios模拟器上运行我的应用程序时,我一直收到以下错误

代码语言:javascript
复制
Xcode's output:
↳
    <unknown>:0: error: merge-module command failed with exit code 1 (use -v to see invocation)
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
    iPhoneSimulator14.5.sdk/usr/include/CommonCrypto/module.modulemap:1:8: error: redefinition of
    module 'CommonCrypto'
    module CommonCrypto [system] [extern_c] {
           ^
    /Users/me/Desktop/project/job/ios/Pods/SCrypto/Frameworks/iphonesimulator/CommonCrypt
    o.framework/module.map:1:8: note: previously defined here
    module CommonCrypto [system] {
           ^
    Command MergeSwiftModule failed with a nonzero exit code
    Command CompileSwift 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
    warning: Capabilities for Signing & Capabilities may not function correctly because its
    entitlements use a placeholder team ID. To resolve this, select a development team in the
    Runner editor. (in target 'Runner' from project 'Runner')

Xcode版本: 12.5 Cocoapods: 1.10.0。

颤振医生输出

代码语言:javascript
复制
[✓] Flutter (Channel dev, 2.3.0-0.1.pre, on macOS 11.3.1 20E241 darwin-arm, locale en-NG)
    • Flutter version 2.3.0-0.1.pre at /Users/me/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d72bfb8d07 (11 days ago), 2021-04-26 06:05:55 -0700
    • Engine revision de6e1adf97
    • Dart version 2.14.0 (build 2.14.0-18.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/moses/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.0

[✓] 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)

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

[✓] Connected device (2 available)
    • iPhone 12 Pro Max (mobile) • 7561F67B-74C8-464F-8191-E5A09B83F01B • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • Chrome (web)               • chrome                               • web-javascript • Google
      Chrome 90.0.4430.93

·未发现任何问题!

Android运行良好,无论我使用哪个flutter频道,这个问题都会持续存在。

我已经尝试了所有的方法,在过去的48小时里,我几乎没有睡过觉,试图解决这个问题。任何帮助都将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2021-05-08 04:19:44

只需在您的swift文件中添加import CommonCrypto即可。我希望这能起到作用。

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

https://stackoverflow.com/questions/67441127

复制
相关文章

相似问题

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