ios - 我无法运行颤振构建 ios
问题描述
我正在对这个应用程序进行维护,并且不得不在应用程序商店上发布它,经过多次错误我终于得到了它。事实证明,我上传了一个有错误的版本,我需要回滚到正常工作的版本。我已经调整了 git 以使用正常的版本,但我无法在 ios 上构建或运行它。
我已经运行了'flutter clean'、rm -rf 'ios/Pods'、'pod install' 和许多其他命令,但没有任何效果。
运行“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
我的播客文件
# 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
我的颤振医生
[✓] 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!
解决方案
推荐阅读
- python - Python scikit - 图像检测并从噪声图像中删除线条
- javascript - 在javascript中相等日期值时出现问题
- apache-spark - 用户“livy”无法在 EMR 中创建本地目录
- ios - iOS - 选择/取消选择 Apple 地图中的标记不起作用
- python - 根据值比较字典列表
- git - 暂时禁用分支中的功能
- ios - 重定向 url 上 OGONE 后付款响应失败的可能原因
- python - Python SDK Docker 客户端无法构建镜像
- java - 有没有办法从每次出现中删除自定义对象?
- c - 使用 FramesToSkip 捕获StackBackTrace 不一致