我正在为IOS开发一个应用程序,我相信我的应用程序不再构建.我在XCODE中得到了一个构建错误,它说:
“分析问题。
“未找到模块音频播放器”。
当我尝试构建VS代码时,同样的问题是:
Xcode构建完成。10,9s
未能构建iOS应用程序
来自Xcode构建的错误输出:
编译失败** Xcode的输出: /Users/sylvain/Developpeur/WORDCHAMP2/word_champion_V1.0/ios/Runner/GeneratedPluginRegistrant.m:12:9:致命错误:找不到模块‘音频播放器’
@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: flutterflutter_localizations:
sdk: flutterfirebase_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
intl:^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 -构建设置-包依赖项下的包依赖关系,它是空的,它只是说“在这里添加包”.这跟我的问题有关系吗?
发布于 2022-01-13 06:38:16
尤里卡!我在浏览网页时找到了这个问题的答案。
问题来自PODFILE。由于一些未知的原因,我的PODFILE几乎是空的。这阻止了依赖项的安装,因此在构建时什么也找不到。
下面是我粘贴在荚文件中的代码(如果可以帮助其他人的话):
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有谁知道我在哪里可以找到好的解释,所有这些文件是为颤振/IOS应用程序构建的?(Podfile,Podfile.lock,xcworkspace,.XCODE的作用.)我讨厌当我不明白事情是怎么发生的时候.当你不知道到底发生了什么事情的时候,你甚至很难开始思考如何解决潜在的问题。
https://stackoverflow.com/questions/70686442
复制相似问题