我在使用构建应用程序时不断收到此错误
xcodebuild
从命令行。
xcodebuild -workspace ios/APP_NAME.xcworkspace -scheme APP_NAME clean archive -sdk iphoneos -configuration Debug -UseModernBuildSystem=NO -archivePath $PWD/APP_NAME CODE_SIGNING_ALLOWED=NO;
该应用程序通过Xcode UI构建良好。这是一个react原生应用程序,我尝试了这里列出的一些东西-
Xcode - ld: library not found for -lPods
,那没用。
-
为Pods和App项目设置相同的部署目标
-
正在删除
libAmplitude.a
来自应用程序项目的Frameworks文件夹
-
背景
Build Active Architecture Only
至NO
-
嵌入
libAmplitude。一
随着
libPods-APP_NAME.a
奇怪的是,它找不到的文件实际上存在于目录中。我看到两个这种类型的故障(arm64和armv7)。
ld: warning: directory not found for option '-L-L/Users/Parth/Library/Developer/Xcode/DerivedData/APP_NAME-atzumsqdaojeyaaukpzreucvvlja/Build/Intermediates.noindex/ArchiveIntermediates/APP_NAME/BuildProductsPath/Debug-iphoneos/Amplitude'
ld: library not found for -lAmplitude
clang: error: linker command failed with exit code 1 (use -v to see invocation)
最终生成失败:
The following build commands failed:
Ld /Users/Parth/Library/Developer/Xcode/DerivedData/APP_NAME-atzumsqdaojeyaaukpzreucvvlja/Build/Intermediates.noindex/ArchiveIntermediates/APP_NAME/IntermediateBuildFilesPath/APP_NAME.build/Debug-iphoneos/APP_NAME.build/Objects-normal/arm64/APP_NAME normal arm64
Ld /Users/Parth/Library/Developer/Xcode/DerivedData/APP_NAME-atzumsqdaojeyaaukpzreucvvlja/Build/Intermediates.noindex/ArchiveIntermediates/APP_NAME/IntermediateBuildFilesPath/APP_NAME.build/Debug-iphoneos/APP_NAME.build/Objects-normal/armv7/APP_NAME normal armv7
(2 failures)
随振幅提交的问题-
https://github.com/amplitude/Amplitude-ReactNative/issues/87
编辑
更改后,这可能是问题的根本原因
other linker flags
到
${inherited}
,我看到两次提到振幅。
-
-l“振幅”
-
-l“固有振幅反应”