目前,我试图在VS AppCenter中构建我的应用程序时遇到了麻烦。这是一个反应性项目,通过可可足类引入了一些依赖性。
一切都在本地正常构建(在干净虚拟机上干净克隆)
在AppCenter的CI环境中,虽然出现以下错误:ld: warning: directory not found for option '-L/Users/vsts/Library/Developer/Xcode/DerivedData/projectname-adroxiklvgljuicvfqowylcdxjrt/Build/Intermediates.noindex/ArchiveIntermediates/unisafe/BuildProductsPath/Release-iphoneos/BVLinearGradient'ld: library not found for -lGoogle-Maps-iOS-Utilsclang: error: linker command failed with exit code 1 (use -v to see invocation)Archive Failed
对于每个吊舱,我都会多次收到第一个警告。
这是我的Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
project './projectname.xcproj'
target 'projectname' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for projectname
pod 'AppCenter/Push', '~> 1.10.0'
pod 'AppCenter/Crashes', '~> 1.10.0'
pod 'AppCenter/Analytics', '~> 1.10.0'
pod 'AppCenterReactNativeShared'
rn_path = '../node_modules/react-native'
rn_maps_path = '../node_modules/react-native-maps'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', path: rn_path, subspecs: [
'ART',
'Core',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
]
pod 'react-native-maps', path: rn_maps_path
pod 'react-native-google-maps', path: rn_maps_path # Remove this line if you don't want to support Google Maps on iOS
pod 'GoogleMaps' # Remove this line if you don't want to support Google Maps on iOS
pod 'Google-Maps-iOS-Utils' # Remove this line if you don't want to support GoogleMaps on iOS
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'react-native-background-timer', :path => '../node_modules/react-native-background-timer'
pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'
pod 'lottie-ios', :path => '../node_modules/lottie-ios'
pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
pod 'TouchID', :path => '../node_modules/react-native-touch-id'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
platform :ios, '11.0'
# target 'projectnameTests' do
# inherit! :search_paths
# # Pods for testing
# end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'react-native-google-maps'
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
end
end
if target.name == "React"
target.remove_from_project
end
end
end
在我的图书馆搜索路径中,我有:
$(inherited)
$(BUILD_DIR)/${CONFIGURATION}$(EFFECTIVE_PLATFORM_NAME)
"${PODS_ROOT}"
任何想法将不胜感激。谢谢。
最佳答案
这不是一个完美的解决方案...但是可以通过在XCode构建设置中的“链接的框架和库”下删除并重新添加所有内容来解决此问题。
我将关闭此窗口,但如果其他人有此问题,请在此处或PM答复-非常乐意提供帮助。
关于react-native - React Native 0.57 + CocoaPods-仅在CI环境中找不到链接的库,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/53087504/