Unity3d使用腾讯的游戏语音GVoice笔记

接入时报如下错误

duplicate symbol _amp2Log2 in:
    /Users/***/workspace/*******/Publish/Debug/iOS/AppSotreXcodeProject/Libraries/libiPhone-lib.a(quant_bands.o)
    /Users/***/workspace/*******/Assets/Editor/XUPorter/Mods/GCloudVoice/libGCloudVoice.a(quant_bands.o)
duplicate symbol _ec_laplace_decode in:
    /Users/***/workspace/*******/Publish/Debug/iOS/AppSotreXcodeProject/Libraries/libiPhone-lib.a(laplace.o)
    /Users/***/workspace/*******/Assets/Editor/XUPorter/Mods/GCloudVoice/libGCloudVoice.a(laplace.o)
ld: 48 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决办法

1、首先记得导出IOS记得勾选和填写红框的内容,不然会报错

导出记得勾选

2、iOS系统配置

将压缩包中的

dist\Unity3D\Plugins\iOS\ GCloudVoice.bundle 

整个文件夹拷贝到自己的工程 **MyProj\Assets\Plugins\iOS **目录下。
链接发布包中静态库

dist\Unity3D\Plugins\iOS\libGCloudVoice.a

,在Unity3d导出的Xcode工程中,同时需要链接如下6个系统库:
这里写图片描述

3、语音权限 Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleDisplayName</key>
	<string>应用名称</string>
	<key>CFBundleExecutable</key>
	<string>${EXECUTABLE_NAME}</string>
	<key>CFBundleIcons</key>
	<dict/>
	<key>CFBundleIcons~ipad</key>
	<dict/>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>2.0.9</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLName</key>
			<string>weixin</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>wx11111111111</string>
			</array>
		</dict>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLName</key>
			<string>com.yunjian.cainiao</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>cainiao</string>
			</array>
		</dict>
	</array>
	<key>CFBundleVersion</key>
	<string>15.3</string>
	<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>wechat</string>
		<string>weixin</string>
	</array>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSAllowsArbitraryLoads</key>
		<true/>
	</dict>
	<key>NSLocationWhenInUseUsageDescription</key>
	<string>本应用的某个功能用到后台定位,将影响电池寿命。</string>
	<key>NSMicrophoneUsageDescription</key>
	<string>本应用将获取打开您的麦克风,它将用于您与其他玩家之间的通讯</string>
	<key>UIAppFonts</key>
	<array/>
	<key>UIPrerenderedIcon</key>
	<true/>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationLandscapeRight</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
	</array>
</dict>
</plist>

最后,文档网址这里是地址

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值