xcode Flutter:在 build/ios/iphonesimulator/Runner.app 中找不到构建的应用程序包
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/57980900/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Flutter: Could not find the built application bundle at build/ios/iphonesimulator/Runner.app
提问by Cuiboy
I am trying to run my application in debug mode from VSCode. However, every time, regardless if I am running on a simulator or a real device, the debug console outputs
我正在尝试从 VSCode 以调试模式运行我的应用程序。但是,每次,无论我是在模拟器还是真实设备上运行,调试控制台都会输出
Could not find the built application bundle at build/ios/iphonesimulator/Runner.app.
or
或者
Could not find the built application bundle at build/ios/iphoneos/Runner.app.
When I went to the specified directory, my app bundle is being built every time but instead of being named Runner.app it is named MyAppName.app. I suspect the difference in name is causing the VSCode compiler to not being able to locate Runner.app.
当我转到指定的目录时,我的应用程序包每次都在构建,但不是命名为 Runner.app,而是命名为 MyAppName.app。我怀疑名称的差异导致 VSCode 编译器无法找到 Runner.app。
My question: How do I change my build settings so that the build bundle is named Runner.app again?
我的问题:如何更改我的构建设置,以便将构建包再次命名为 Runner.app?
回答by M.Bilal Murtaza
回答by masewo
Did you change the "Display Name" of Runner in your Xcode project? After I tried to change the "Display Name" to a custom name I got your mentioned error. After I renamed it back to "Runner" everything works fine again.
您是否更改了 Xcode 项目中 Runner 的“显示名称”?在我尝试将“显示名称”更改为自定义名称后,我收到了您提到的错误。在我将它重命名回“Runner”之后,一切又正常了。
回答by Abeer Iqbal
Change App name to Runner. If this doesn't work then Select Runner->Runner(Target)->Build Settings->Packaging-> "Product Name" change it to Runner. That will definitely work.
将应用程序名称更改为 Runner。如果这不起作用,则选择 Runner->Runner(Target)->Build Settings->Packaging->"Product Name" 将其更改为 Runner。那肯定会奏效。
回答by Chethana Arunodh
Maybe you changed name of the application via xcode? Then in
也许您通过 xcode 更改了应用程序的名称?然后在
ios/Runner.xcodeproj/project.pbxproj and find
ios/Runner.xcodeproj/project.pbxproj 并找到
PRODUCT_NAME
Then set
然后设置
PRODUCT_NAME = Runner
Before Run
use flutter clean && flutter run
Run
使用前flutter clean && flutter run