0

and thank you in advance.

While working on my code, for some odd reason it just stopped working. I was working on it, randomly the app crashed. And then I couldn't get it up and running again. I've tried several things, including starting a fresh document and pasting the code. As well as trying a previously working version.

I did try other projects from Github, and those worked fine. So I'm assuming it's nothing to do with my android studio installation or the sorts.

Unfortunately, given the very random nature of the error, I'm not sure on the steps that could be taken to reproduce it.

Here's the error from flutter


Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                            3.9s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/armpac/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/vibration-1.2.4/ios/Classes/VibrationPlugin.m:2:9: fatal error: 'vibration/vibration-Swift.h' file not found
    #import <vibration/vibration-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    /Users/armpac/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/contacts_service-0.3.10/ios/Classes/ContactsServicePlugin.m:2:9: fatal error: 'contacts_service/contacts_service-Swift.h' file not found
    #import <contacts_service/contacts_service-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

On the other hand, Xcode gives me this:

Ld /Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator/Runner.app/Runner normal x86_64 (in target 'Runner' from project 'Runner')
    cd /Users/armpac/AndroidStudioProjects/Mutuality2/ios
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-ios8.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -L/Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator -L/Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator/contacts_service -L/Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator/flutter_keyboard_visibility -L/Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator/path_provider -L/Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator/vibration -L/Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator/contacts_service -L/Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator/flutter_keyboard_visibility -L/Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator/path_provider -L/Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator/vibration -L/Users/armpac/AndroidStudioProjects/Mutuality2/ios/Flutter -F/Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator -F/Users/armpac/AndroidStudioProjects/Mutuality2/ios/Pods/../Flutter -F/Users/armpac/AndroidStudioProjects/Mutuality2/ios/Pods/../Flutter -F/Users/armpac/AndroidStudioProjects/Mutuality2/ios/Flutter -filelist /Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/Runner.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/Runner_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lcontacts_service -lflutter_keyboard_visibility -lpath_provider -lvibration -framework Flutter -ObjC -lcontacts_service -lflutter_keyboard_visibility -lpath_provider -lvibration -framework Flutter -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Runner.build/Debug-iphonesimulator/Runner.build/Runner.app-Simulated.xcent -framework Flutter -framework App -lPods-Runner -Xlinker -dependency_info -Xlinker /Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/x86_64/Runner_dependency_info.dat -o /Users/armpac/AndroidStudioProjects/Mutuality2/build/ios/Debug-iphonesimulator/Runner.app/Runner

ld: library not found for -lcontacts_service
clang: error: linker command failed with exit code 1 (use -v to see invocation)



  • have you tried to try to add to ios/Podfile line 'use_frameworks!'? Like here https://stackoverflow.com/questions/41210249/why-do-we-use-use-frameworks-in-cocoapods – awaik Feb 23 '20 at 07:53
  • I added the line, but absolutely no change. I really wonder how did this go from working with Columns and Rows, to completely missing a path or document. – Armando Pacheco Ortiz Feb 23 '20 at 13:57

1 Answers1

0

So at the end of the day, removing the packages was all I had to do. Made sure to remove it from PubSpec.Yml, any folder I could find related to them. Cleaned build, and voila.

Glad to be back at it.