8000 I can't run flutter build ios · Issue #85676 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

I can't run flutter build ios #85676

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
rodrigoalexandrino opened this issue Jul 1, 2021 · 7 comments 8000
Closed

I can't run flutter build ios #85676

rodrigoalexandrino opened this issue Jul 1, 2021 · 7 comments
Labels
r: timeout Issue is closed due to author not providing the requested details in time

Comments

@rodrigoalexandrino
Copy link

Steps to Reproduce

I'm doing maintenance on this app and had to publish it on the app store, after many errors I finally got it. It turns out that I uploaded a version with errors and I need to rollback to the version that was working. I've already adjusted git to use the version that was ok, but I can't build or run it on ios.

I've run the commands 'flutter clean', rm -rf 'ios/Pods', 'pod install' and many others, but nothing works.

Error on run 'flutter build ios'

Xcode's output:
↳
    Command CompileSwift failed with a nonzero exit code
    Undefined symbols for architecture arm64:
      "_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
          objc-class-ref in FLTSharedPreferencesPlugin.o
      "_FlutterMethodNotImplemented", referenced from:
          ___52+[FLTSharedPreferencesPlugin registerWithRegistrar:]_block_invoke
          in FLTSharedPreferencesPlugin.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see
    invocation)
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete

My podfile

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Runner
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end

My flutter doctor

[✓] Flutter (Channel stable, 1.22.5, on macOS 11.2.1 20D74 darwin-x64, locale
    pt-BR)
    • Flutter version 1.22.5 at /Users/rodrigoalexandrino/Developer/flutter
    • Framework revision 7891006299 (7 months ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/rodrigoalexandrino/Library/Android/sdk
    • Platform android-30, build-tools 30.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-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    • CocoaPods version 1.10.1

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin installed
    • Dart plugin version 201.9335
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.57.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.23.0

[✓] Connected device (1 available)
    • iPhone de Karine (mobile) • bf3d3c5b7cf200289d16bae7bed8ef98ddd32a24 • ios
      • iOS 14.6

• No issues found!
@TahaTesser TahaTesser added the in triage Presently being triaged by the triage team label Jul 1, 2021
@TahaTesser
Copy link
Member

Hi @edgarfroes
Unfortunately, the version you're using is outdated and is no longer supported, it's not feasible to provide any bug fixes for such an old version of Flutter.

I kindly advise you to update to the latest Fluter stable, if you encounter this issue, please comment below with the details from the latest stable, including steps to replicate the issue.

Can you please upgrade to the latest stable and try again
Execute the following commands to upgrade
flutter channel stable
flutter upgrade --force
flutter doctor -v

Thank you

@TahaTesser TahaTesser added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 1, 2021
@rodrigoalexandrino
Copy link
Author

@TahaTesser It turns out that for now it's not possible to update flutter, as I'll have to refactor a lot of the code and I need to upload a new version to the app store as soon as possible.

Another error that's happening right now is:
ld: framework not found Flutter

@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 Jul 1, 2021
@TahaTesser
Copy link
Member

@rodrigoalexandrino
If the issue persists on the latest flutter without third-party packages, let me know

@TahaTesser TahaTesser added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 2, 2021
@LongXiangGuo
Copy link

I have met the same problem too, the building arch is wrong.

Suggest you exclude the arm64 in your podfile config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64', and override you xcodebuildSettings

EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
ARCHS[sdk=iphonesimulator*] = x86_64
VALID_ARCHS[sdk=iphonesimulator*] = x86_64

@TahaTesser
Copy link
Member

@rodrigoalexandrino
Does the solution above worked for you?

@TahaTesser TahaTesser added waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds and removed waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Jul 28, 2021
@TahaTesser
Copy link
Member

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.

Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.

@TahaTesser TahaTesser added r: timeout Issue is closed due to author not providing the requested details in time and removed waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds in triage Presently being triaged by the triage team labels Aug 27, 2021
@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 Sep 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: timeout Issue is closed due to author not providing the requested details in time
Projects
None yet
Development

No branches or pull requests

3 participants
0