我遵循这个这里的说明来安装和测试Firebase Crashlytics:
以下是其中一个步骤需要做的工作:
在Xcode中,从项目导航中选择Runner。 选择“构建阶段”选项卡,然后单击+>“新建运行脚本阶段”。 在Type脚本中添加以下内容.Shell属性下的文本框:
我按照上面的说明将以下内容粘贴到XCode中:
$PODS_ROOT/FirebaseCrashlytics/upload-symbols --build-phase --validate -ai <googleAppId>
$PODS_ROOT/FirebaseCrashlytics/upload-symbols --build-phase -ai <googleAppId>
大胸!我用我从Firebase获得的真实AppId来更改AppId。
当我再次启动我的应用程序时,我会得到以下错误:
2021-12-23 19:16:50.044 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
2021-12-23 19:16:51.049 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
2021-12-23 19:16:52.054 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
2021-12-23 19:16:53.060 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
2021-12-23 19:16:54.061 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
2021-12-23 19:16:55.066 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
2021-12-23 19:16:56.072 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
2021-12-23 19:16:57.076 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
2021-12-23 19:16:58.080 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
2021-12-23 19:16:59.085 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
2021-12-23 19:17:00.087 upload-symbols[31089:256482] Unable to get file attributes for dSYM file at path "/Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM/Contents/Resources/DWARF/Runner"
Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
warning: DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations. This could also be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved the dSYM from the location Xcode generated it. Unable to process Runner.app.dSYM at path /Users/ednuser/Developer/FlutterProjects/MyProject/build/ios/Debug-iphoneos/Runner.app.dSYM
Make sure your project build settings are generating a dSYM file.
Processing dSYMs...
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
/Users/ednuser/Developer/FlutterProjects/MyProject/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'leveldb-library' from project 'Pods')
Could not build the precompiled application for the device.
Error launching application on Test Iphone
我在下列地点将最低监督办目标定为14个:
当我运行我的应用程序时,我仍然收到这条消息:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'leveldb-library' from project 'Pods')
Could not build the precompiled application for the device.
Error launching application on Test Iphone
I使用MAC M1 BigSur.
我还尝试了以下几点:
我仍然有同样可爱的问题!
但是如果我删除了我在Xcode中添加到脚本阶段的2行代码,一切都会非常好!
我完全没有解决办法了。有谁能有更好的主意吗?
发布于 2022-01-05 13:08:12
以下解决方案帮助我解决了您的问题:对项目进行构建设置,然后在构建设置中搜索调试信息格式,搜索“调试信息格式”,然后将“调试信息格式”设置为“dSYM文件矮化”。
并确保在生成设置中生成调试符号设置为Yes。
发布于 2022-01-21 18:06:00
生成设置->调试信息格式->将所有生成类型设置为与dYSM文件相形见绌。
对我来说,只有配置文件和发布版本被设置为与dYSM文件相形见绌。因此,我对调试版本也做了同样的操作,以便在开发模式下运行我的应用程序。
发布于 2022-03-23 17:25:25
通过删除构建设置中目标的Product Name
中的空格,我以某种方式修正了这个错误。
https://stackoverflow.com/questions/70466166
复制相似问题