问题
I'm having a bit of trouble with including javax.script.*; in an Android project. I need it so I can use the "eval" function in JavaScript, in order to parse arithmetic functions efficiently, without building a parser myself (I have utterly no experience in that and not a lot of time on my hands).
Is there any chance to use JavaScript or the "eval" function or something similar in my Android app?
Thanks for any info you can give me
回答1:
Execute the JS code with webview
回答2:
Try JEXL. It should do what you need but is simpler than the entire Javascript interpreter.
来源:https://stackoverflow.com/questions/6967824/can-i-use-javax-script-in-android-development-and-if-yes-how