Skip to content

Cannot open file ios/Runner.xcodeproj/project.pbxproj #22886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ChristBKK opened this issue Oct 9, 2018 · 13 comments
Closed

Cannot open file ios/Runner.xcodeproj/project.pbxproj #22886

ChristBKK opened this issue Oct 9, 2018 · 13 comments
Labels
c: crash Stack traces logged to the console platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@ChristBKK
Copy link

ChristBKK commented Oct 9, 2018

Steps to Reproduce

  1. 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"
@zoechi zoechi added c: crash Stack traces logged to the console platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. labels Oct 10, 2018
@zoechi zoechi added this to the Goals milestone Oct 10, 2018
@qtbeee
Copy link

qtbeee commented Oct 31, 2018

I had this error today and I found that the file in question was actually in the .ios directory instead of ios. So I flutter createed to repair the project and removed the .ios directory and now it works.

@JonasJW
Copy link

JonasJW commented Dec 15, 2018

I have the same issue.

@qtbeee What do you mean by "flutter createed"? flutter create is not a command I can run to repair anything, just to create new projects.

@zoechi
Copy link
Contributor

zoechi commented Dec 16, 2018

@JonasJW you can indeed use flutter create . to "repair" the current project to a limited degree.
If the ios/ or android/ 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
Copy link
Contributor

zoechi commented Dec 16, 2018

@ChristBKK did @qtbeee's suggestion apply to your problem as well?

@zoechi zoechi added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 16, 2018
@JonasJW
Copy link

JonasJW commented Dec 16, 2018

flutter create . indeed solved the problem for me. Thank you!

@px200
Copy link

px200 commented 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.

@zoechi zoechi added the t: xcode "xcodebuild" on iOS and general Xcode project management label Jan 8, 2019
@no-response
Copy link

no-response bot commented 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

@no-response no-response bot closed this as completed Jan 8, 2019
@zoechi zoechi removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jan 8, 2019
@zoechi
Copy link
Contributor

zoechi commented Jan 8, 2019

Reopening in case there can something done to prevent that in the future.

@bMil21
Copy link

bMil21 commented Mar 20, 2019

@JonasJW flutter create . works for me. Thanks!

@bruno-farias
Copy link

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
Copy link

Zhaimm commented May 7, 2019

flutter create . 解决了问题,非常感谢

@blackwiz4rd
Copy link

The only solution for me is to remove the build folder: rm -rf build/

@lock
Copy link

lock bot commented 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.

@lock lock bot locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: crash Stack traces logged to the console platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

9 participants