1
我在跨平台应用程序中使用UniWebView 2,并在应用程序编译并在Android上运行时为iOS构建它,在XCode中构建项目时出现错误。我试图创建一个空项目并编译UniWebView示例场景之一,并得到相同的错误。为iOS编译时出现UniWebView链接器错误(使用Unity 5,XCode 7.3.1和iOS SDK 9.3)
所述是错误如下:
Undefined symbols for architecture armv7:
"__WebViewPlugin_EvaluateJS", referenced from:
_WebViewObject__WebViewPlugin_EvaluateJS_m3600170591 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject__WebViewPlugin_EvaluateJS_m3600170591 in Bulk_Assembly-CSharp-firstpass_0.o
(maybe you meant: _WebViewObject__WebViewPlugin_EvaluateJS_m3600170591)
"__WebViewPlugin_SetVisibility", referenced from:
_WebViewObject__WebViewPlugin_SetVisibility_m1941317136 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject_SetVisibility_m1306909320 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject__WebViewPlugin_SetVisibility_m1941317136 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject_SetVisibility_m1306909320 in Bulk_Assembly-CSharp-firstpass_0.o
(maybe you meant: _WebViewObject__WebViewPlugin_SetVisibility_m1941317136)
"__WebViewPlugin_SetMargins", referenced from:
_WebViewObject__WebViewPlugin_SetMargins_m46209250 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject_SetMargins_m3594992190 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject__WebViewPlugin_SetMargins_m46209250 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject_SetMargins_m3594992190 in Bulk_Assembly-CSharp-firstpass_0.o
(maybe you meant: _WebViewObject__WebViewPlugin_SetMargins_m46209250)
"__WebViewPlugin_LoadURL", referenced from:
_WebViewObject__WebViewPlugin_LoadURL_m3058146388 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject__WebViewPlugin_LoadURL_m3058146388 in Bulk_Assembly-CSharp-firstpass_0.o
(maybe you meant: _WebViewObject__WebViewPlugin_LoadURL_m3058146388)
"__WebViewPlugin_Destroy", referenced from:
_WebViewObject__WebViewPlugin_Destroy_m2965791645 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject_OnDestroy_m852260632 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject__WebViewPlugin_Destroy_m2965791645 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject_OnDestroy_m852260632 in Bulk_Assembly-CSharp-firstpass_0.o
(maybe you meant: _WebViewObject__WebViewPlugin_Destroy_m2965791645)
"__WebViewPlugin_SetFrame", referenced from:
_WebViewObject__WebViewPlugin_SetFrame_m3791199226 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject_SetCenterPositionWithScale_m3707009509 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject__WebViewPlugin_SetFrame_m3791199226 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject_SetCenterPositionWithScale_m3707009509 in Bulk_Assembly-CSharp-firstpass_0.o
(maybe you meant: _WebViewObject__WebViewPlugin_SetFrame_m3791199226)
"__WebViewPlugin_Init", referenced from:
_WebViewObject__WebViewPlugin_Init_m1745555759 in Bulk_Assembly-CSharp-firstpass_0.o
_WebViewObject__WebViewPlugin_Init_m1745555759 in Bulk_Assembly-CSharp-firstpass_0.o
(maybe you meant: _WebViewObject__WebViewPlugin_Init_m1745555759)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
使它们的命令是这样的:
Ld /Users/studentdeveloper/Library/Developer/Xcode/DerivedData/Unity-iPhone-cufatstjeeklntdglsasxcmmpkyu/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName normal armv7
cd /Users/studentdeveloper/projects/UniWebViewTest/build/move_prefab_and_scripts_2
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -L/Users/studentdeveloper/Library/Developer/Xcode/DerivedData/Unity-iPhone-cufatstjeeklntdglsasxcmmpkyu/Build/Products/Release-iphoneos -L/Users/studentdeveloper/projects/UniWebViewTest/build/move_prefab_and_scripts_2 -L/Users/studentdeveloper/projects/UniWebViewTest/build/move_prefab_and_scripts_2/Libraries -F/Users/studentdeveloper/Library/Developer/Xcode/DerivedData/Unity-iPhone-cufatstjeeklntdglsasxcmmpkyu/Build/Products/Release-iphoneos -filelist /Users/studentdeveloper/Library/Developer/Xcode/DerivedData/Unity-iPhone-cufatstjeeklntdglsasxcmmpkyu/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName.LinkFileList -Xlinker -map -Xlinker /Users/studentdeveloper/Library/Developer/Xcode/DerivedData/Unity-iPhone-cufatstjeeklntdglsasxcmmpkyu/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/ProductName-LinkMap-normal-armv7.txt -miphoneos-version-min=6.0 -dead_strip -fembed-bitcode-marker -weak_framework CoreMotion -weak-lSystem -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -framework CoreText -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreMedia -weak_framework CoreMotion -framework CoreVideo -framework Foundation -weak_framework iAd -framework MediaPlayer -framework OpenAL -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -liconv.2 -liPhone-lib -Xlinker -dependency_info -Xlinker /Users/studentdeveloper/Library/Developer/Xcode/DerivedData/Unity-iPhone-cufatstjeeklntdglsasxcmmpkyu/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName_dependency_info.dat -o /Users/studentdeveloper/Library/Developer/Xcode/DerivedData/Unity-iPhone-cufatstjeeklntdglsasxcmmpkyu/Build/Intermediates/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName
- 我遵守了插件目录结构
- 我使用IL2CPP作为脚本后端
- 我针对正确的设备,SDK和iOS版本
- 我曾尝试禁用位码和启用保留私人外部符号在XCode项目设置
我成功地构建和部署在iPad模拟器(x86_64的,因为我建立在64位苹果机)
Here就是有问题的方法定义
感谢您的时间WebViewObject.cs文件。