9

It was working project on android but when I try to build on iOS I couldn't do it, please share me with knowledge if face with this issue too. Sorry for my broken English.

Here's log file:

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter build ios --release

exception

ProcessException: ProcessException: Process exited abnormally: Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list

2020-05-30 10:58:59.614 xcodebuild[22085:408139] Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.} xcodebuild: error: Unable to read project 'Runner.xcodeproj'. Reason: The project ‘Runner’ is damaged and cannot be opened due to a parse error. Examine the project file for invalid edits or unresolved source control conflicts.

Path: /Users/itinternational/AndroidStudioProjects/shipping_driver/ios/Runner.xcodeproj Command: /usr/bin/xcodebuild -list

#0      RunResult.throwException (package:flutter_tools/src/base/process.dart:172:5)
#1      _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart:322:19)
<asynchronous suspension>
#2      XcodeProjectInterpreter.getInfo (package:flutter_tools/src/ios/xcodeproj.dart:389:50)
#3      buildXcodeProject (package:flutter_tools/src/ios/mac.dart:108:78)
#4      BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:83:43)
#5      _rootRunUnary (dart:async/zone.dart:1192:38)
#6      _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#7      _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#8      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#9      Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#10     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#11     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#12     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#13     ApplicationPackageStore.getPackageForPlatform (package:flutter_tools/src/application_package.dart)
#14     _rootRunUnary (dart:async/zone.dart:1192:38)
#15     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#16     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#17     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#18     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#19     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#20     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#21     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#22     BuildableIOSApp.fromProject (package:flutter_tools/src/application_package.dart)
#23     _rootRunUnary (dart:async/zone.dart:1192:38)
#24     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#25     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#26     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#27     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#28     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#29     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#30     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#31     IosProject.productBundleIdentifier (package:flutter_tools/src/project.dart)
#32     _rootRunUnary (dart:async/zone.dart:1192:38)
#33     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#34     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#35     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#36     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#37     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#38     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#39     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#40     IosProject.buildSettings (package:flutter_tools/src/project.dart)
#41     _rootRunUnary (dart:async/zone.dart:1192:38)
#42     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#43     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#44     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#45     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#46     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#47     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#48     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#49     XcodeProjectInterpreter.getBuildSettings (package:flutter_tools/src/ios/xcodeproj.dart)
#50     _asyncErrorWrapperHelper.errorCallback (dart:async-patch/async_patch.dart:86:61)
#51     _rootRunBinary (dart:async/zone.dart:1204:38)
#52     _CustomZone.runBinary (dart:async/zone.dart:1093:19)
#53     _FutureListener.handleError (dart:async/future_impl.dart:155:20)
#54     Future._propagateToListeners.handleError (dart:async/future_impl.dart:694:47)
#55     Future._propagateToListeners (dart:async/future_impl.dart:715:24)
#56     Future._completeError (dart:async/future_impl.dart:534:5)
#57     _AsyncAwaitCompleter.completeError (dart:async-patch/async_patch.dart:43:15)
#58     _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart)
#59     _rootRunUnary (dart:async/zone.dart:1192:38)
#60     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#61     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#62     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#63     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#64     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#65     Future.wait.<anonymous closure> (dart:async/future.dart:402:22)
#66     _rootRunUnary (dart:async/zone.dart:1192:38)
#67     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#68     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#69     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#70     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#71     Future._addListener.<anonymous closure> (dart:async/future_impl.dart:391:9)
#72     _rootRun (dart:async/zone.dart:1184:13)
#73     _CustomZone.run (dart:async/zone.dart:1077:19)
#74     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#75     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
#76     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#77     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#78     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#79     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

flutter doctor

[✓] Flutter (Channel stable, v1.17.2, on Mac OS X 10.15.5 19F96, locale en-KG)
    • Flutter version 1.17.2 at /Users/itinternational/Downloads/flutter
    • Framework revision 5f21edf8b6 (33 hours ago), 2020-05-28 12:44:12 -0700
    • Engine revision b851c71829
    • Dart version 2.8.3

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/itinternational/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (1 available)
    • iPhone SE (2nd generation) • 9AD7BC02-943F-44FE-A4E3-FED33FE669DE • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)

• No issues found!
2
  • Try removing your ios folder and re-create it running flutter create -i swift . . Probably something inside the folder is broken. Commented May 30, 2020 at 5:16
  • Great! I will post it as solution Commented May 31, 2020 at 0:07

3 Answers 3

14

Try removing your ios folder and re-create it running flutter create -i swift . . Probably something inside the folder is broken.

Sign up to request clarification or add additional context in comments.

2 Comments

p.s: the directory name should follow dart packages naming convention , don't know why, but gave an error because my dir name started with a capital letter
I was following a tutorial which did not mention this ios folder creation. When I got to the command flutter pub run flutter_launcher_icons:main the ios folder was missing. But this create -i swift command solved the FileSystemException: Cannot open file error
6

run cd ios and then pod install . It will tell you what is wrong with the project. Remove that error-causing part.

I faced this issue when I used the 'flutter_launcher_icons' package. Here is how I solved this:

  1. running pod install. it showed me the error-causing part of the project.
  2. For me, the error was due to , just before the ; in the following statement:

ASSETCATALOG_COMPILER_APPICON_NAME = true,;

  1. I searched this statement in the whole project and removed the error causing , from all the search results.
  2. running pod install again and it was successful.
  3. I was able to open Runner successfully.

1 Comment

I had a similar issue where the flutter_launcher_icons package introduced a rogue character into my project.pbxproj file. It was an orphan } at the bottom of the page.
0
flutter create --platforms ios

1 Comment

No option specified for the output directory Is the error that generates for me

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.