簡體   English   中英

Zbar條形碼掃描儀使用PhoneGap編譯時出錯

[英]Zbar Barcode Scanner compile error with PhoneGap

實施Zbar條形碼掃描器插件時,讓我的PhoneGap 3.2.0應用在Mac上編譯時出現問題。 如果將其部署到設備,它將在XCode中編譯,但是如果部署到模擬設備,則會出現錯誤:

Ld DerivedData / MYAPP / Build / Products / Debug-iphonesimulator / MYAPP.app / MYAPP normal i386 cd / Users / Cordova / MyApp / platforms / ios setenv IPHONEOS_DEPLOYMENT_TARGET 5.0 setenv PATH“ /Applications/Xcode.app/Contents/Developer/Platforms/ iPhoneSimulator.platform / Developer / usr / bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ usr / bin:/ bin:/ usr / sbin:/ sbin“ /Applications/Xcode.app/Contents/開發人員/工具鏈/XcodeDefault.xc工具鏈/ usr / bin / clang ++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L / Users / Cordova / MyApp / platforms / ios / DerivedData / MYAPP / Build / Products / Debug-iphonesimulator -L / Users / Cordova / MyApp / platforms / ios / ZBarSDK -L / Users / Cordova / MyApp / platforms / ios / MYAPP / Plugins / com .manateeworks.barcodescanner / MWBarcodeScanner -F / Users / Cordova / MyApp / platforms / ios / DerivedData / MYAPP / Build / Products / Debug-iphonesimulator -filelist / Users / Cordova / MyApp / platforms / ios / DerivedData / MYAPP / Build / Intermediates / MYA PP.build/Debug-iphonesimulator/MYAPP.build/Objects-normal/i386/MYAPP.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load / Users / Cord / MyApp /平台/ ios / DerivedData / MYAPP / Build /產品/Debug-iphonesimulator/libCordova.a -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min = 5.0-框架AssetsLibrary -framework CoreGraphics -framework MobileCoreServices -framework CoreLocation -weak_framework ImageIO -framework CoreMotion -weak_framework AudioToolbox -weak_framework SystemConfiguration -framework Foundation -framework UIKit -framework AVFoundation -framework CoreMedia -framework CoreVideo -framework QuartzCore -liconv -lzbarerX -link /Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Intermediates/MYAPP.build/Debug-iphonesimulator/MYAPP.build/Objects-normal/i386/MYAPP_dependenc y_info.dat -o /Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Products/Debug-iphonesimulator/MYAPP.app/MYAPP

ld:警告:忽略文件/Users/Cordova/MyApp/platforms/ios/ZBarSDK/libzbar.a,缺少文件/Users/Cordova/MyApp/platforms/ios/ZBarSDK/libzbar.a中所需的體系結構i386(3個切片)未定義體系結構i386的符號:
“ _OBJC_CLASS _ $ _ ZBarReaderViewController”,引用自:ZbarcodeScanner.o中的objc-class-ref“ _ZBarReaderControllerResults”,引用自:ZbarcodeScanner.o中的-[ZbarcodeScanner imagePickerController:didFinishPickingMediaWithInfo:] ld:找不到體系結構i386的符號錯誤:鏈接器命令失敗,退出代碼為1(使用-v查看調用)

雖然我實際上並不需要模擬設備; 問題是從終端運行命令時:

$ cordova build ios

它拋出錯誤:

錯誤:構建ios項目時發生錯誤。

**建立失敗**

以下構建命令失敗:

  Ld build/emulator/MyApp.app/MyApp normal i386 

(1次失敗)

如果我嘗試自行鍵入錯誤中顯示的命令,它將告訴我:

ld:找不到文件:build / emulator / MyApp.app / MyApp

沒錯 它不存在。 我認為在此之前還有其他失敗,並阻止了它的創建。

如果我一起刪除Zbar,一切正常。

我制作的該應用程序的先前版本可以追溯到PhoneGap v2.5.0,並且沒有使用命令行界面來創建構建。 我已經手動將它們放在一起,所以沒有給我這個問題。

在“構建設置/構建階段”部分中,我已經嘗試了很多方法。 我已經在這里待了兩個星期了,似乎我嘗試的所有事情都會導致新的錯誤消息。 請幫忙!

我解決了! 我將ZBar的版本降級為以前的版本,並且可以立即使用。 我的項目中有一些版本顯然具有ios7修復程序。 不確定最終導致您問題的確切原因是什么。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM