【发布时间】:2019-07-24 09:59:52
【问题描述】:
我经常在我的日志中看到类似这样的重复消息:
Method exceeds compiler instruction limit: 29278 in void com.xxxxxxapp.xxxxxx.MyGLRenderer.onDrawFrame(javax.microedition.khronos.opengles.GL10)
Method exceeds compiler instruction limit: 29278 in void com.xxxxxxapp.xxxxxx.MyGLRenderer.onDrawFrame(javax.microedition.khronos.opengles.GL10)
Method exceeds compiler instruction limit: 29278 in void com.xxxxxxapp.xxxxxx.MyGLRenderer.onDrawFrame(javax.microedition.khronos.opengles.GL10)
分解代码通常会以较小的数字给出相同的消息:
Method exceeds compiler instruction limit: 22400 in void com.xxxxxxapp.xxxxxx.MyGLRenderer.onDrawFrame(javax.microedition.khronos.opengles.GL10)
我认为 64000 是保留在这里的神奇数字。尽管有这样的唠叨消息,我的游戏代码似乎总是运行良好,而且不仅仅是在 opengl onDrawFrame 方法中。尽管更新代码比绘制代码更容易分解,但我在更新方法中也收到了类似的消息,远低于 64K。
对“方法超出编译器指令限制”的搜索让我获得了可怕的“Dalvik 编译器对 64K 方法的限制”错误的链接。我必须继续忽略这一点吗?
【问题讨论】:
-
也许 64k 是字节?