问题描述
目前,它的possible动态加载 .dex
类文件到Android的Dalvik虚拟机。这很可能也可用于<一href="http://stackoverflow.com/questions/2610995/dynamically-generating-dalvik-byte$c$c-into-a-running-dalvik-android-application">dynamic code世代在运行时。
Currently, it's possible to dynamically load .dex
classfiles into Android's Dalvik VM. This could probably also be used for dynamic code generation at runtime.
这是仍然可以与即将举行的艺术运行?
推荐答案
这似乎工作就像它的Dalvik做到了。
It seems to work just like it did with Dalvik.
感谢matiash为参考I / O 2014年的谈话!我看过它的视频录制,这里是开发商不得不说在运行时$ C $ Ç加载(从成绩单拍摄):
Thanks to matiash for referencing the I/O 2014 talk! I've watched the video recording of it, and here is what the developers have to say on runtime code loading (taken from the transcript):
[观众提问:]所以,我不知道如何艺术是要 牛仔舞[?]以字节为code注射液可能发生之后 编译,甚至在运行时。
[...]
[伊恩·罗杰斯答:]这样的Dalvik已经和模特艺术继续 是的类装载器,我们必须有一切类 加载程序通过一个文件备份。所以Dalvik的从未有过支持的 样做到底内存注入指令,等等。
[Answer by Ian Rogers:] So the model that Dalvik has and ART continues is that for class loaders, we have to have everything that the class loader has backed up by a file. So Dalvik never had supports for the kind of doing end memory injection of instructions, and so on.
如果您有磁盘上的文件,那么这是我们可以做的提前 时间汇编和投入我们的缓存,这样,我们不 再生它所有的时间。所以基本上,它的工作方式相同 与Dalvik的。
If you have a file on the disk, then this is something we can do ahead of time compilation for and put into our cache so that we're not regenerating it all of the time. So basically, it works the same way as with Dalvik.
这篇关于难道Android的技术支持,运行时动态类加载就像Dalvik的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!