在Android上使用Groovy

在Android上使用Groovy

本文介绍了在Android上使用Groovy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着 ASMDEX (的的DEX文件)和 dexmaker 的,应该不会是可能端口的Groovy到Android?这两个框架允许DEX字节code一代在运行时。

With the advent of ASMDEX (ASM for dex files) and dexmaker, shouldn't it be possible to port Groovy to Android? Both frameworks allow the generation of dex bytecode at runtime.

据我所知,这是不可能在内存中修改DEX类的APK。但它不会是可能对这些类复制到可写的存储器,修改这些副本在运行时使用它们?

As I understand it, it is impossible to modify dex classes from the APK in memory. But wouldn't it be possible to copy those classes to writable memory, modify those copies at runtime and use them?

还有什么需要被移植到处理DEX类文件? CGLIB

What else needs to be ported to handle dex class files? CGLIB?

推荐答案

原来的移植项目被命名的然后有些人做了一个名为的 AFAIK的第一个项目有班不运行时转换,但能够运行在Android第一Groovy的方案,以非常缓慢启动时间。至于第二个项目,最后给我已知状态是,他们解决了大多数问题,现在翻译班运行。但我从来没有尝试过的。

The original porting project is named discobot then some guys made a new project called discobot2 Afaik the first project had no runtime transformation of classes, but was able to run first Groovy programs on Android, with a very slow startup time. As for the second project the last to me known state is that they solved most issues and are now translating classes at runtime. But I never tried it out.

更新:在Groovy 2.4 第三个版本上运行的Groovy Android是可能的。

Update: since Groovy 2.4 a third version to run Groovy on Android is possible

这篇关于在Android上使用Groovy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 05:29