Closed
Description
Steps to Reproduce
- Flutter Run
Logs
command
flutter run
exception
FileSystemException: FileSystemException: Cannot open file, path = '/Users/christian/Documents/coding/spirit4/spirit4/ios/Runner.xcodeproj/project.pbxproj' (OS Error: No such file or directory, errno = 2)
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:368:9)
#1 _rootRunUnary (dart:async/zone.dart:1132:38)
#2 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#3 _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#4 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#5 Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#6 Future._completeWithValue (dart:async/future_impl.dart:486:5)
#7 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:516:7)
#8 _rootRun (dart:async/zone.dart:1124:13)
#9 _CustomZone.run (dart:async/zone.dart:1021:19)
#10 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#11 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#12 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#13 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#14 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
flutter doctor
[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.13.6 17G2307, locale en-TH)
• Flutter version 0.9.4 at /Users/christian/documents/coding/flutter
• Framework revision f37c235c32 (2 weeks ago), 2018-09-25 17:45:40 -0400
• Engine revision 74625aed32
• Dart version 2.1.0-dev.5.0.flutter-a2eb050044
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
• Android SDK at /Users/christian/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.0, Build version 10A255
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 27.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] VS Code (version 1.28.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.19.0
[✓] Connected devices (1 available)
• iPhone XS Max • F701DB9C-85B5-425E-A5B8-9749A44CA6D2 • ios • iOS 12.0 (simulator)
• No issues found!
Pubspec:
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.0
scoped_model: "^0.3.0"
http: "^0.11.3+16"
shared_preferences: "^0.4.3"
rxdart: "^0.18.1"
map_view: "^0.0.12"
location: "^1.4.1"
image_picker: "^0.4.5"
mime: "^0.9.6"
url_launcher: "^3.0.2"
dev_dependencies:
flutter_launcher_icons: "^0.6.1"
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
qtbeee commentedon Oct 31, 2018
I had this error today and I found that the file in question was actually in the
.ios
directory instead ofios
. So Iflutter create
ed to repair the project and removed the.ios
directory and now it works.JonasJW commentedon Dec 15, 2018
I have the same issue.
@qtbeee What do you mean by "
flutter create
ed"?flutter create
is not a command I can run to repair anything, just to create new projects.zoechi commentedon Dec 16, 2018
@JonasJW you can indeed use
flutter create .
to "repair" the current project to a limited degree.If the
ios/
orandroid/
folders are missing, they are created.You can use this to switch native language Java/Kotlin, ObjC/Swift or to get the generated files updated to match newer Flutter versions by deleting the directories and running
flutter create . [options]
. You need to re-apply previously made manual changes yourself though.zoechi commentedon Dec 16, 2018
@ChristBKK did @qtbeee's suggestion apply to your problem as well?
JonasJW commentedon Dec 16, 2018
flutter create .
indeed solved the problem for me. Thank you!px200 commentedon Dec 22, 2018
I was following https://codelabs.developers.google.com/codelabs/first-flutter-app-pt2/#5
Xcode could build for real phone, then I changed the name from Runner to HelloFlutter, and Xcode can still build for iphone, but flutter run is not working, generate Cannot open file ios/Runner.xcodeproj/project.pbxproj error.
And I changed the name back, everything is working again.
no-response commentedon Jan 8, 2019
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
cc @Hixie
zoechi commentedon Jan 8, 2019
Reopening in case there can something done to prevent that in the future.
bMil21 commentedon Mar 20, 2019
@JonasJW
flutter create .
works for me. Thanks!bruno-farias commentedon Mar 23, 2019
Delete the flutter cache folder located at /Users/username/Documents/flutter/bin/cache and run
flutter doctor
, it will download all dependencies again. Worked for me.Zhaimm commentedon May 7, 2019
flutter create . 解决了问题,非常感谢
blackwiz4rd commentedon Mar 11, 2020
The only solution for me is to remove the build folder:
rm -rf build/
lock commentedon Apr 4, 2020
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -v
and a minimal reproduction of the issue.