颤动:在 XCODE 中找不到模块 xxxxxxxx
FLUTTER : MODULE xxxxxxxx not found in XCODE
我正在为 IOS 开发一个 flutter 应用程序并在“flutter pub upgrade”之后我相信,我的应用程序不再构建...我在 XCODE 中遇到构建错误说:
'解析问题。
'Module Audioplayers not found'.
当我尝试在 VS CODE 中构建时,同样的问题:
Xcode 构建完成。 10,9s
无法构建 iOS 应用程序
Xcode 构建的错误输出:
↳
** 构建失败 **
Xcode 的输出:
↳
/Users/sylvain/Developpeur/WORDCHAMP2/word_champion_V1.0/ios/Runner/GeneratedPluginRegistrant.m:12:9:致命错误:找不到模块 'audioplayers'
@import audioplayers;
~~~~~~~^~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
无法为设备构建预编译应用程序。
我在堆栈溢出或 git 上发现了类似的问题,但我阅读的内容没有任何效果...我检查了目标版本等...
它只是行不通。
我对此感到绝望,因为我根本不明白会发生什么......
这可能与我的包裹有关....
这是我的 pubspeck.yaml 文件:
dependencies:
颤振:
sdk: flutter
flutter_localizations:
sdk: flutter
firebase_core: ^1.10.5
firebase_auth: ^3.3.3
cloud_firestore: ^3.1.4
animated_text_kit: ^4.2.1
email_validator: ^2.0.1
提供商:^6.0.1
动画:^2.0.1
国际:^0.17.0
flutter_tts: ^3.2.2
连通性:^3.0.6
google_fonts: ^2.1.0
cupertino_icons: ^1.0.3
speech_to_text: ^5.3.0
percent_indicator: ^3.4.0
flutter_rounded_progress_bar: ^0.2.0
pdf: ^3.6.5
path_provider: ^2.0.5
open_file: ^3.2.1
shared_preferences: ^2.0.11
sleek_circular_slider: ^2.0.1
avatar_glow: ^2.0.1
音频播放器:^0.20.1
有人可以帮忙吗?
还有一件事:当我在 XCODE 中单击 RUNNER 时:我得到三个选项卡:INFO - BUILD SETTINGS - PACKAGE DEPENDENCIES
在 PACKAGE DEPENDENCIES 下,它是空的,它只是说“在此处添加包”......这与我的问题有什么关系吗?
尤里卡!我在浏览网页时找到了这个问题的答案。
问题来自 PODFILE。由于某种未知原因,我的 PODFILE 几乎是空的。这阻止了依赖项的安装,因此在构建时什么也没找到。
这是我粘贴到我的 pod 文件中的代码(如果它可以帮助其他人的话):
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
use_frameworks!
use_modular_headers!
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)
end
end
有谁知道我可以在哪里找到关于为 FLUTTER/IOS 应用程序构建的所有这些文件的详细解释? (Podfile,Podfile.lock,xcworkspace,... XCODE 的作用...)当我不明白事情是如何工作的时候,我讨厌它...这让我什至很难开始思考关于当您不知道实际发生了什么时如何解决潜在问题...
我正在为 IOS 开发一个 flutter 应用程序并在“flutter pub upgrade”之后我相信,我的应用程序不再构建...我在 XCODE 中遇到构建错误说:
'解析问题。
'Module Audioplayers not found'.
当我尝试在 VS CODE 中构建时,同样的问题:
Xcode 构建完成。 10,9s
无法构建 iOS 应用程序
Xcode 构建的错误输出:
↳ ** 构建失败 ** Xcode 的输出: ↳ /Users/sylvain/Developpeur/WORDCHAMP2/word_champion_V1.0/ios/Runner/GeneratedPluginRegistrant.m:12:9:致命错误:找不到模块 'audioplayers'
@import audioplayers;
~~~~~~~^~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
无法为设备构建预编译应用程序。
我在堆栈溢出或 git 上发现了类似的问题,但我阅读的内容没有任何效果...我检查了目标版本等... 它只是行不通。
我对此感到绝望,因为我根本不明白会发生什么...... 这可能与我的包裹有关....
这是我的 pubspeck.yaml 文件:
dependencies:
颤振:
sdk: flutter
flutter_localizations:
sdk: flutter
firebase_core: ^1.10.5
firebase_auth: ^3.3.3
cloud_firestore: ^3.1.4
animated_text_kit: ^4.2.1
email_validator: ^2.0.1
提供商:^6.0.1
动画:^2.0.1
国际:^0.17.0
flutter_tts: ^3.2.2
连通性:^3.0.6
google_fonts: ^2.1.0
cupertino_icons: ^1.0.3
speech_to_text: ^5.3.0
percent_indicator: ^3.4.0
flutter_rounded_progress_bar: ^0.2.0
pdf: ^3.6.5
path_provider: ^2.0.5
open_file: ^3.2.1
shared_preferences: ^2.0.11
sleek_circular_slider: ^2.0.1
avatar_glow: ^2.0.1
音频播放器:^0.20.1
有人可以帮忙吗? 还有一件事:当我在 XCODE 中单击 RUNNER 时:我得到三个选项卡:INFO - BUILD SETTINGS - PACKAGE DEPENDENCIES 在 PACKAGE DEPENDENCIES 下,它是空的,它只是说“在此处添加包”......这与我的问题有什么关系吗?
尤里卡!我在浏览网页时找到了这个问题的答案。
问题来自 PODFILE。由于某种未知原因,我的 PODFILE 几乎是空的。这阻止了依赖项的安装,因此在构建时什么也没找到。
这是我粘贴到我的 pod 文件中的代码(如果它可以帮助其他人的话):
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
use_frameworks!
use_modular_headers!
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)
end
end
有谁知道我可以在哪里找到关于为 FLUTTER/IOS 应用程序构建的所有这些文件的详细解释? (Podfile,Podfile.lock,xcworkspace,... XCODE 的作用...)当我不明白事情是如何工作的时候,我讨厌它...这让我什至很难开始思考关于当您不知道实际发生了什么时如何解决潜在问题...