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_ ...
随机推荐
- ASP.NET Core管道深度剖析(3):管道是如何处理HTTP请求的?
我们知道ASP.NET Core请求处理管道由一个服务器和一组有序的中间件组成,所以从总体设计来讲是非常简单的,但是就具体的实现来说,由于其中涉及很多对象的交互,我想很少人能够地把它弄清楚.为了让读者 ...
- XML技术之SAX解析器
1.解析XML文件有三种解析方法:DOM SAX DOM4J. 2.首先SAX解析技术只能读取XML文档中的数据信息,不能对其文档中的数据进行添加,删除,修改操作:这就是SAX解析技术的一个缺陷. 3 ...
- ZFPlayer 源码解读
源码下载地址:https://github.com/renzifeng/ZFPlayer 之前自己实现过一个模仿百思不得姐的demo https://github.com/agelessman/FFm ...
- CSS学习笔记——包含块 containing block
以下内容翻译自CSS 2.1官方文档.网址:https://www.w3.org/TR/CSS2/visudet.html#strut 有时,一个元素的盒子的位置和尺寸根据一个确定的矩形计算,这个确定 ...
- Android测试提升效率批处理脚本(三)
前言: 前面放出过几次批处理,这次只放一个环境检查的被管理员给打回来了,不得不再找找几个有含金量的放出来,请看正文~~~ 目录 1.Android环境检查 2.Android内存监控 3.模拟蓝牙手柄 ...
- [协议]ICMP协议剖析
1.ICMP简介 ICMP全名为(INTERNET CONTROL MESSAGE PROTOCOL)网络控制消息协议. ICMP的协议号为1. ICMP报文就像是IP报文的小弟,总顶着IP报文的名头 ...
- Node基础篇(文件操作)
文件操作 相关模块 Node内核提供了很多与文件操作相关的模块,每个模块都提供了一些最基本的操作API,在NPM中也有社区提供的功能包 fs: 基础的文件操作 API path: 提供和路径相关的操作 ...
- line-height不同单位之间的区别
line-height用来设置元素的行高. 该属性会影响行框的布局.在应用到一个块级元素时,它定义了该元素中基线之间的最小距离而不是最大距离. line-height 与 font-size 的计算值 ...
- awk使用说明
原文地址:http://www.cnblogs.com/verrion/p/awk_usage.html Awk使用说明 运维必须掌握的三剑客工具:grep(文件内容过滤器),sed(数据流处理器), ...
- EF 在controller弹出提示消息
第一种方式: return Content("<script>alert('此名称课程再次班级中已经存在!');window.location.href = 'Course/Cr ...