Skip to content
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

Building for iOS fails: ld: framework not found Flutter #43591

Closed
Qiu-Jun opened this issue Oct 27, 2019 · 18 comments
Closed

Building for iOS fails: ld: framework not found Flutter #43591

Qiu-Jun opened this issue Oct 27, 2019 · 18 comments
Labels
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

@Qiu-Jun
Copy link

Qiu-Jun commented Oct 27, 2019

Xcode's output:
↳
    ld: framework not found Flutter
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build systemnote: Planning buildnote: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
@Qiu-Jun
Copy link
Author

Qiu-Jun commented Oct 27, 2019

my xcode version is 11.1
it's no problem with xcode 10

@Qiu-Jun Qiu-Jun changed the title i have something wrong width update xcode in flutter i have something wrong width update xcode Oct 27, 2019
@BondarenkoStas
Copy link

@BondarenkoStas BondarenkoStas added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 28, 2019
@jmagman
Copy link
Member

jmagman commented Oct 28, 2019

What exact command produced that? Flutter is not supported in Release mode on the simulator.

@Qiu-Jun
Copy link
Author

Qiu-Jun commented Oct 28, 2019

What exact command produced that? Flutter is not supported in Release mode on the simulator.

flutter run. it can run in android stadio

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 28, 2019
@jmagman
Copy link
Member

jmagman commented Oct 28, 2019

What exact command produced that? Flutter is not supported in Release mode on the simulator.

flutter run. it can run in android stadio

flutter run defaults to release mode. You can target a real device with release, or the simulator with debug.

flutter run --debug

Duplicate of #11754.

Let's keep this open, I think we should detect the simulator is being targeted in release mode and short-circuit with a better error message.

@jmagman jmagman changed the title i have something wrong width update xcode Running release mode against iOS simulators fails with linker error Oct 28, 2019
@jmagman jmagman added t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels. platform-ios iOS applications specifically labels Oct 28, 2019
@Qiu-Jun
Copy link
Author

Qiu-Jun commented Oct 29, 2019

What exact command produced that? Flutter is not supported in Release mode on the simulator.

flutter run. it can run in android stadio

flutter run defaults to release mode. You can target a real device with release, or the simulator with debug.

flutter run --debug

Duplicate of #11754.

Let's keep this open, I think we should detect the simulator is being targeted in release mode and short-circuit with a better error message.

qiujundeMacBook-Pro:flutter_shop qiujun$ flutter run --debug
Launching lib/main.dart on iPhone 11 in debug mode...
Running Xcode build...                                                  
 ├─Assembling Flutter resources...                           6.9s
 └─Compiling, linking and signing...                         1.0s
Xcode build done.                                            9.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    ld: framework not found Flutter
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build systemnote: Planning buildnote: Constructing build description

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

@Qiu-Jun
Copy link
Author

Qiu-Jun commented Oct 29, 2019

What exact command produced that? Flutter is not supported in Release mode on the simulator.

flutter run. it can run in android stadio

flutter run defaults to release mode. You can target a real device with release, or the simulator with debug.

flutter run --debug

Duplicate of #11754.

Let's keep this open, I think we should detect the simulator is being targeted in release mode and short-circuit with a better error message.

failed to build

@jmagman
Copy link
Member

jmagman commented Oct 29, 2019

Do you have any plugins?
Does ios/Runner.xcworkspace successfully build in Xcode?

@jmagman jmagman added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 29, 2019
@Qiu-Jun
Copy link
Author

Qiu-Jun commented Oct 29, 2019

Do you have any plugins?
Does ios/Runner.xcworkspace successfully build in Xcode?

build in xcode with the problem,but i run flutter doctor can find flutter

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

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 29, 2019
@jmagman
Copy link
Member

jmagman commented Oct 29, 2019

  1. What's the output of flutter doctor -v?
  2. Do you have any plugins?
  3. When you open in Xcode do you see Flutter.framework in your project?
    Screen Shot 2019-10-28 at 6 49 26 PM

@jmagman jmagman added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 29, 2019
@jmagman jmagman changed the title Running release mode against iOS simulators fails with linker error Building for iOS fails: ld: framework not found Flutter Oct 29, 2019
@Qiu-Jun
Copy link
Author

Qiu-Jun commented Oct 29, 2019

  1. What's the output of flutter doctor -v?
  2. Do you have any plugins?
  3. When you open in Xcode do you see Flutter.framework in your project?
    Screen Shot 2019-10-28 at 6 49 26 PM

thank you!I have resolve the problem by install flutter again!

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 29, 2019
@Qiu-Jun
Copy link
Author

Qiu-Jun commented Oct 29, 2019

@juneQiu Please check https://stackoverflow.com/a/54860339/12268368.

thanks,i have resolve it by install flutter again

@Qiu-Jun Qiu-Jun closed this as completed Oct 29, 2019
@jmagman jmagman reopened this Oct 29, 2019
@jmagman
Copy link
Member

jmagman commented Oct 29, 2019

You resolved the issue by reinstalling flutter again? Do you know what version you were on before?
I'm concerned that framework ever disappeared.

@Qiu-Jun
Copy link
Author

Qiu-Jun commented Oct 29, 2019

Yes,it can run with iOS simulators ,when i reinstall flutter. I have forgotten the old version. The old version was installed about three or four months ago.

@Qiu-Jun Qiu-Jun closed this as completed Oct 29, 2019
@Skullper
Copy link

Skullper commented Feb 1, 2020

I have faced the same issue after re-installing XCode. To fix this I've just upgraded Flutter flutter upgrade and run pod install. Hope it'll help someone

@Qiu-Jun
Copy link
Author

Qiu-Jun commented Feb 1, 2020

I have faced the same issue after re-installing XCode. To fix this I've just upgraded Flutter flutter upgrade and run pod install. Hope it'll help someone

yes,My flutter version was too low at the time

@Qiu-Jun Qiu-Jun reopened this Feb 1, 2020
@Qiu-Jun Qiu-Jun closed this as completed Feb 1, 2020
@srjmalla
Copy link

This fixed the issue for me

-- flutter channel stable

-- flutter upgrade

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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

5 participants