IOS错误Could not produce class with ID
运行环境
Unity 5.3.5f1 (IL2CPP)编译IOS版本
XCode Version 7.2.1 (7C1002)
Mac OS X 10.11.3 (15D21) (Mac mini)
iPhone 5,6 ,iPad
错误信息
Could not produce class with ID
Could not produce class with ID XXX.
This could be caused by a class being stripped from the build even though it is needed. Try disabling 'Strip Engine Code' in Player Settings.:<LoadWWWIEnumerator>c__Iterator99:MoveNext()
具体表现:可能是APP闪退,提示上示错误信息
解决办法
1. 在上面的错误提示中,有提示 disabling “Strip Engine Code”
所以我们要做的就是在Player Setting – Other Setting,去掉勾选 Strip Engine
如果要Strip Engine
如果要Strip Engine,那就需要把不想被strip的添加进来。
1. 新建link.xml放在Assets目录下,里面添加不想被strip的dll的名字
ID查询: https://docs.unity3d.com/Manual/ClassIDReference.html
下面是导入高通Vuforia之后,SDK中默认的link.xml的内容
<linker>
<!-- The following assemblies contain namespaces that should be fully preserved
even when assembly stripping is used. Not excluding the assemblies below from
stripping can result in crashes or various exceptions. -->
<assembly fullname="Vuforia.UnityExtensions">
<namespace fullname="Vuforia" preserve="all"/>
</assembly>
<assembly fullname="System">
<namespace fullname="System.Runtime.InteropServices" preserve="all"/>
<namespace fullname="System.Collections.Generic;" preserve="all"/>
<namespace fullname="System.Linq;" preserve="all"/>
<namespace fullname="System.Text.RegularExpressions;" preserve="all"/>
<namespace fullname="System.IO;" preserve="all"/>
<namespace fullname="System;" preserve="all"/>
</assembly>
</linker>
如果提示的ID的是Editor的,比如 AnimatorController(ID 91)属于Editor包里的,不能用link.xm加回来,可以在Resource下建一个空的prefab,在上面挂一个AnimatorController,打包时留下这个prefab就可以确保这个类不被strip掉了。
参考:https://forum.unity3d.com/threads/could-not-produce-class-with-id-91-ios.267548/
Unity的默认值
以Unity5.3.5为例
ios平台,默认勾选了 Strip Engine Code,且Script Background为I2CPP
android平台,默认disabled Strip Engine Code,且Script Background为Mono2x
IOS错误Could not produce class with ID的更多相关文章
- IOS - unity3d错误Could not produce class with ID
运行环境 Unity 5.3.5f1 (IL2CPP)编译IOS版本 XCode Version 7.2.1 (7C1002) Mac OS X 10.11.3 (15D21) (Mac mini) ...
- 【ZBar】ios错误ignoring file xxx missing required architecture x86_64 in file
解决方法: 1.在Project target里"Architectures"设置为:Standard (armv7,armv7s)或者 Standard (armv7,arm6 ...
- iOS 错误及解决汇总
1. iOS 错误 之 http请求 2. iOS 错误 之 Unexpected interface name 'HomeListCell': expected expression 3. iOS ...
- ORA-01578和ORA-26040--NOLOGGING操作引起的坏块-错误解释和解决方案(文档ID 1623284.1)
ORA-01578和ORA-26040--NOLOGGING操作引起的坏块-错误解释和解决方案(文档ID 1623284.1) (一)NOLOGGING操作引起的坏块(ORA-01578和ORA-26 ...
- IOS 错误 [UIWebView cut:]: unrecognized selector sent to instance
那在什么场景中会出现这种情况呢? 如果一个包含文字的输入元素有焦点,然后按钮的点击会导致输入失去焦点,然后接下来在输入时双按会重新得到焦点并从弹出bar中选择剪切复制粘贴,就会导致此error. 也就 ...
- android 编译错误 Error:(1, 0) Plugin with id 'com.android.application' not found.
在导入一个项目时,由于它本身的gradle版本比较高,你试用比较旧版本的gradle时就报出Plugin with id 'com.android.application' not found.的错误 ...
- IOS 错误集合以及解决办法(持续整理中)
1 . 如下错误: app:resource fork, Finder information, or similar detritus not al site:forums.developer.ap ...
- 在IOS开发中,属性名为id的处理方法
在.h 文件中定义属性名为id { int _id; } @property (nonatomic, assign) int id; 在.m 文件中用synthesize声明该属性,会自动生成get和 ...
- iOS - 获取安装所有App的Bundle ID
先导入#import <objc/runtime.h>头文件 使用runtime获取设备上的所有app的bundle id // Class LSApplicationWorkspace_ ...
随机推荐
- Kafka 文档用例
1.2 用例 以下是一些Kafka 常见的用例.关于功能方面的一些概念,可以看这篇博客:http://engineering.linkedin.com/distributed-systems/log- ...
- Chrome浏览器必装的扩展工具
名称 作用 下载地址 Postman 模拟各种http请求 点击下载 JSON Viewer 访问json结果自动视图化 点击下载 Axure RP Extension for Chrome 查看Ax ...
- 让我们山寨一张Windows Azure Global的壁纸
用过国际版Azure的同学都见过一个显示了机器中主要信息的壁纸,而这个壁纸是通过Sysinternals的一款叫做bginfo来实现的,这款软件的好处是对于批量管理主(虚拟)机的管理员和使用方都很实用 ...
- CSS知识总结(四)
CSS常用样式 2.元素样式 1)宽度 width:auto|length 单位:设置以像素计的宽度值(px) 设置以百分比计的宽度值(%) 例:p {width:200px;} div {width ...
- asp.net结合uploadify实现多附件上传
1.说明 uploadify是一款优秀jQuery插件,主要功能是批量上传文件.大多数同学对多附件上传感到棘手,现将asp.net结合uploadfiy如何实现批量上传附件给大家讲解一下,有什么不对的 ...
- GJM : Unity3D HIAR -【 快速入门 】 二、搭建开发环境
感谢您的阅读.喜欢的.有用的就请大哥大嫂们高抬贵手"推荐一下"吧!你的精神支持是博主强大的写作动力以及转载收藏动力.欢迎转载! 版权声明:本文原创发表于 [请点击连接前往] ,未经 ...
- Linux文件管理命令笔记
more\less:翻页命令 more:翻页的形式查看文件内容.该命令可作为管道命令. 翻页过程可使用的键: 空格(space):向下翻页: 回车(Enter):向下翻一行: b:往回翻,只限,但管道 ...
- spring springMVC
spring是一个开源框架,是为了解决企业应用程序开发,功能如下 目的:解决企业应用开发的复杂性 功能:使用基本的javabean代替EJB,并提供了更多的企业应用功能 范围:任何java应用 总之: ...
- MSSQL远程连接
背景:部署公司自己研发的ERP系统. 1)系统架构: .NET+MSSQL. 2)服务器系统:Windows Server 2008 R2 Enterprise 3)数据库:MSSQL Server ...
- iframe高度自适应(同域)
今天解决了iframe高度自适应的问题,不过这只是同域下的页面嵌入,以下是代码: function SetCwinHeight(){ var iframeid = document.getElemen ...