EasyAR Crashed with “讯飞” or Google Play Games

最近项目中同时接入了EasyAR(v1.3)、科大讯飞语音库(v1.162),运行时在EasyAR初始化时报错,导致app闪退。
崩溃日志:

ARBuilder: ImageTracker (EasyAR.ImageTrackerBehaviour) bind CameraDevice (EasyAR.CameraDeviceBehaviour)
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

libc++abi.dylib: terminating with uncaught exception of type std::domain_error: type must be string, but is null
(lldb)

看到这个log,知道是c++层出了问题了,于是将Unity编译IL2CPP换成Mono2x,就好了。
but!!!
我们必须要用IL2CPP,原因不赘述。
于是我找到网上一个帖子 ,其中有这么一个解答:

It seems Google do not like RTTI (a C++ language feature) and they simply disabled them. 
But we are building EasyAR with many C++ language features including RTTI. 
This do not make a trouble on Android where Google is working on because we have shared libraries there. 
But the problem is, Apple prefer static libraries which makes most of the trouble.

于是知晓是c++ runtime出了问题,去检查Xcode工程的相关配置,果然被我发现了有一个 Enable C++ Runtime Types的配置,改为true,就好了!

你可能感兴趣的:(EasyAR Crashed with “讯飞” or Google Play Games)