Flutter: Cannot build iOS project

Issue

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!

Solution

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

Answered By – Enzo Lizama

Answer Checked By – Gilberto Lyons (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.