Android Studio无法与ios simmulator一起运行

拉斐尔·科利奥(Raffaele Colleo)

我正在尝试使用Mac的ios模拟器来模拟我的Flutter应用程序,但出现此错误。在升级Android Studio和Xcode之前,它工作正常。

Launching lib/main.dart on iPhone X in debug mode...
Starting Xcode build...
Xcode build done.
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    error: Multiple commands produce '/Users/User/AndroidStudioProjects/my_app/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
    1) Target 'Runner' has copy command from '/Users/User/AndroidStudioProjects/my_app/ios/Flutter/Flutter.framework' to '/Users/User/AndroidStudioProjects/my_app/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
    2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
    warning: ignoring duplicated output file: '/Users/User/AndroidStudioProjects/my_app/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' (in target 'Runner')
    note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone X.

使用:

  • macOS 10.13.6(17G65)
  • Android Studio 3.2内部版本#AI-181.5540.7.32.5014246,建于2018年9月18日
  • Xcode 10.0(10A255)
  • Xcode Simulator 10.0(SimulatorApp-869.5 CoreSimulator-572.2)
贡特·佐赫鲍尔(GünterZöchbauer)

应该固定在master频道中

https://github.com/flutter/flutter/issues/20685#issuecomment-421511890

解决方法

有两种解决方法:

  • 选项1:使用旧版构建系统。如@ gi097所述,打开ios/Runner.xcworkspace,并将构建系统更改为Legacy Build System
  • 选项2:使用新的Xcode 10构建系统。
    1. 打开 ios/Runner.xcworkspace
    2. Runner在项目导航器侧栏中选择项目。
    3. 在主视图中,选择Runner目标,然后选择Build Phases选项卡。
    4. 扩展Embed Frameworks阶段,然后Flutter.framework从嵌入式框架列表中进行选择
    5. 单击-Flutter.framework从列表中删除(请确保保留 App.framework)。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

phonegap运行android无法与以下设备一起运行:错误:未知的皮肤名称'WXGA720'

脚本无法与cron一起运行

Spark-Submit:无法与virtualenv一起运行

无法使xUnit测试与.NET Core一起运行

无法与Mesos一起运行Spark

Babel Transpiler无法与Nodemon一起运行

RML 和 FnO 无法一起运行

无法使Blazor项目与Entity Framework一起运行

无法让 junit 与 Karma 一起运行

摩卡无法与Nightwatch一起运行

当与Visual Studio 2015一起运行时,OpenCV无法打开视频文件

无法运行规范规范,但可以与 Maven 一起运行

Android Nougat要求IDE必须与Java 1.8或更高版本一起运行

Android模拟器未与我的React Native App一起运行

Android N是否要求IDE可以与Java 1.8或更高版本一起运行?

一起运行时,Android Instrumented测试失败

与VirtualBox机器一起运行Android模拟器

从Visual Studio发布后,WPF APP将无法运行,但将与管理员一起运行

与Web应用程序一起运行的Visual Studio的内存泄漏

如何让C#代码文件与Visual Studio 2015一起运行

测试无法与Junit 5和Maven一起运行

与 Jenkins 一起运行的硒测试无法与元素交互

graphql-codegen无法与配置文件一起运行

无法与Django代码一起运行Vue.js 3

Crontab cron作业将无法与带有参数的url一起运行

在MacOS上的brew中安装了Octave 4.2.1;无法使其与GUI一起运行

已启动的OSX无法与teamcity代理一起运行bash

ASP.NET 5(ASP.NET Core)-无法与IIS一起运行

彗星(comet-ml)无法与Keras一起运行