我在尝试安装和使用mapbox的同时在Android上使用MAPBOX的同时,我一直在遇到此错误构建是framework not found Mapbox
通过Cocoapods安装时,我会从Xcode
中获得错误framework not found Mapbox
Ld /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/clustr.app/clustr normal x86_64
cd /Users/michaelstokes/clustr/clustr_app/ios
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk -L/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator -L/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/React -L/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/Stripe -L/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/react-native-mapbox-gl -L/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/yoga -F/Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator -F/Users/michaelstokes/Documents/FacebookSDK -filelist /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Intermediates.noindex/Clustr.build/Debug-iphonesimulator/clustr.build/Objects-normal/x86_64/clustr.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=8.0 -Xlinker -object_path_lto -Xlinker /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Intermediates.noindex/Clustr.build/Debug-iphonesimulator/clustr.build/Objects-normal/x86_64/clustr_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lReact -lStripe -lreact-native-mapbox-gl -lstdc++ -lyoga -framework AddressBook -framework Foundation -framework JavaScriptCore -framework Mapbox -framework PassKit -framework Security -framework WebKit -framework XCTest -weak_framework Contacts -ObjC -lc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Intermediates.noindex/Clustr.build/Debug-iphonesimulator/clustr.build/clustr.app.xcent /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libReact.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTAnimation.a -framework FBSDKLoginKit /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTNetwork.a -framework FBSDKShareKit -framework Bolts /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTVibration.a -framework FBSDKCoreKit /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -lAirMaps -lRNDeviceInfo -lPods-clustr -lRCTCamera -lreact-native-branch -lRNGeocoder -lReact -lyoga -lcxxreact -ljschelpers -lRNVectorIcons -lTPSStripe -Xlinker -dependency_info -Xlinker /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Intermediates.noindex/Clustr.build/Debug-iphonesimulator/clustr.build/Objects-normal/x86_64/clustr_dependency_info.dat -o /Users/michaelstokes/Library/Developer/Xcode/DerivedData/Clustr-fkpfvfogtttxepgdsdrkmamfpvax/Build/Products/Debug-iphonesimulator/clustr.app/clustr
ld: framework not found Mapbox
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My podfile is as follows:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'clustr' do
# Flexbox Layout Manager Used By React Natve
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
# React Native
pod 'React', path: '../node_modules/react-native', subspecs: [
# Comment out any unneeded subspecs to reduce bundle size.
'Core',
'DevSupport',
'RCTActionSheet',
'RCTAnimation',
'RCTBlob',
'RCTCameraRoll',
'RCTGeolocation',
'RCTImage',
'RCTNetwork',
'RCTPushNotification',
'RCTSettings',
'RCTTest',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'RCTLinkingIOS'
]
# Mapbox
pod 'react-native-mapbox-gl', :path => '../node_modules/@mapbox/react-native-mapbox-gl'
pod 'Stripe', '~> 10.1.0'
inherit! :search_paths
end
When running pod install I get
MacBook-Pro:ios michaelstokes$ pod install
Analyzing dependencies
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `react-native-mapbox-gl` from `../node_modules/@mapbox/react-native-mapbox-gl`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga/Yoga.podspec`
Downloading dependencies
Using React (0.50.4)
Using Stripe (10.1.0)
Using react-native-mapbox-gl (6.0.1)
Using yoga (0.50.4.React)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 19 dependencies from the Podfile and 4 total pods installed.
[!] Automatically assigning platform ios with version 8.0 on target clustr because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] The `clustr [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-clustr/Pods-clustr.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `clustr [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-clustr/Pods-clustr.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
非常感谢!
我找不到MAPBOX,但是在按目标上找到答案后,覆盖了framework_search_paths构建设置目标覆盖framework_search_paths构建有关将$(inherited)
添加到已解决的框架搜索路径的设置,但随后存在与LIBC相关的问题, abi.dylib:终止未被职的nSexception
(lldb)
要解决构建过程中的framework not found Mapbox
问题,我必须将$(inherited)
添加到框架搜索路径中,然后构建是成功的,但是在尝试包含Mapbox视图时会遵循问题部分答案是,它解决了framework not found Mapbox
的问题,但随后在MapBox上存在以下问题:libc abi.dylib:终止以nsexception类型(LLDB)
如果在iOS模拟器上安装此错误时,您必须在Framework Search Paths
中添加它(如上所述) - 但是,请使用调试和释放的选项:
设备
任何iOS SDK
模拟器
任何iOS模拟器SDK
我将第一个选项放入框架搜索路径中,并且该项目在物理设备上构建了罚款。但是,当我去模拟器上使用它时,它失败了 - 这就是原因。
这是我的道路:
$(SRCROOT)/../node_modules/@mapbox/react-native-mapbox-gl/ios