Reputation: 241
I need to load the class in the running application that if you do not recompile and reinstall and restart the entire application, and only ONE place that I develop. So i think about two ways: 1) Compile .java to .class on host, and send .class (java bytecode), which is unacceptable for dalvik VM, but java bytecode to dalvik bytecode runtime converter i don't found. 2) Send source code of class as string, and compile in runtime. But i found only dexmaker, which is mock generator, not string source compiler.
Compiling String as Code during Runtime on Android
Is there any solution?
p.s. Sorry for my English.
Update: maybe i can dynamically load classes.dex and "instancing" (i don't know is this word exist) my class?
Upvotes: 1
Views: 506
Reputation: 25767
You can use DexClassLoader
to load a classes.dex
file. This question might help you as well.
Upvotes: 2