android - Android ART 是否像 Dalvik 一样支持运行时动态类加载?

标签 android code-generation dalvik art-runtime

目前是possible.dex 类文件动态加载到 Android 的 Dalvik VM 中。这也可能用于 dynamic code generation at runtime .

upcoming ART runtime 是否仍然可行? ?

最佳答案

它似乎与 Dalvik 一样工作。

感谢 matiash 引用 I/O 2014 演讲!我看过the video recording其中,以下是开发人员对运行时代码加载的看法(摘自文字记录):

[Question from the audience:] So I was wondering how ART is going to jive[?] with byte code injection that might happen right after compilation or even at runtime.

[...]

[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.

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 - Android ART 是否像 Dalvik 一样支持运行时动态类加载?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23739261/

相关文章:

android - 如何让设备在代码中进入休眠状态?

android - 是否有任何努力来开发具有额外/嵌入式安全性的 Dalvik VM?

java - 在 Android 上使用正则表达式实现部分匹配时遇到问题

android - 新 Android 代码的属性动画与 View 动画

android - Android SDK 中的 overridePendingTransition 不起作用

android - 如何获取带有标题的日历事件,包括重复事件

dynamic - 是否可以在 Python 脚本中生成和执行 Python 代码? [动态 Python 代码]

rust - 如何从 crate/module/functions 派生代码?

c# - 在运行时编译和使用类

android - ART 中的 Zygote(Android 运行时)