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_ ...
随机推荐
- 《JavaScript高级程序设计》读书笔记 2
1,动态模型模式 function Person (name,age,job) { this.name=name; this.age=age; this.job=job; if(typeof this ...
- 【目录】本博客其他.NET开源项目文章目录
本博客所有文章分类的总目录链接:本博客博文总目录-实时更新 1.本博客其他.NET开源项目文章目录 37..NET平台开源项目速览(17)FluentConsole让你的控制台酷起来 36..NET平 ...
- 从零开始编写自己的C#框架(16)——Web层后端父类
本章节讲述的各个类是后端系统的核心之一,涉及到系统安全验证.操作日志记录.页面与按键权限控制.后端页面功能封装等内容,希望学习本系列的朋友认真查看新增的类与函数,这对以后使用本框架进行开发时非常重要. ...
- Linux上oracle精简版客户端快速部署
RHEL6 + Oracle 11g客户端快速部署 需求:只是用到客户端的sqlplus, sqlldr功能. 方案:用精简版实现客户端的快速部署 1.上传oracle精简版客户端到服务器/tmp目录 ...
- ASP.NET MVC Controller的激活
最近抽空看了一下ASP.NET MVC的部分源码,顺带写篇文章做个笔记以便日后查看. 在UrlRoutingModule模块中,将请求处理程序映射到了MvcHandler中,因此,说起Controll ...
- Angular2 小贴士-多级注入器
angular2 的依赖注入包含了太多的内容,其中的一个重点就是注入器,而注入器又非常难理解,今天我们不深入介绍注入器的内容,可以参考官方文档,我们今天来说注入器的层级. 也就是组件获取服务的容器会选 ...
- Marshal.Copy将指针拷贝给数组
lpStatuss是一个UNITSTATUS*的指针类型实例,并包含SensorDust字段 //定义一个数组类型 byte[] SensorDust = new byte[30] //将指针类型拷贝 ...
- Hibernate全套增删改查+分页
1.创建一个web工程 2.导入jar包 3.创建Student表 4.创建实体类 package com.entity; public class Student { private Integer ...
- IT基础架构规划方案一(网络系统规划)
背景 某集团经过多年的经营,公司业务和规模在不断发展,公司管理层和IT部门也认识到通过信息化手段可以更好地支撑公司业务运营.提高企业生产和管理效率.同时随着新建办公 ...
- Socket简单使用
客户端代码: import java.io.*; import java.net.*; public class DailyAdviceClient { public void go(){ try{ ...