我可以使用任何 JVM 语言为 Android 编程吗?

发布于 2024-09-04 09:58:26 字数 244 浏览 1 评论 0原文

我可以使用除 Java 之外的其他 JVM 语言(例如 jruby、jython、clojure)来为 android 编程,还是只能使用 java?

有人提出了类似的问题一年前,但我不确定自那以后是否有任何变化。

Can I use other JVM languages besides Java (e.g. jruby, jython, clojure) to program for android, or is it java only?

There was a similar question asked over a year ago but I wasn't sure if there'd been any change since then.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

卷耳 2024-09-11 09:58:26

查看这些链接:

但是,我不知道有任何著名的应用程序是用这些语言编写的。我见过的例子更多地属于“概念证明”类别。虽然很酷,但我仍然不认为这些语言对于认真的 Android 开发人员来说是一个可行的工具。我很想看到有人证明我错了!

看来 Scala 目前最接近这个目标。

Check out these links:

However, I am unaware of any prominent applications that have been coded in any of these languages. The examples I've seen fall more into the "proof of concept" category. While the cool factor is high, I still don't see these languages as a viable tool for serious Android developers. I'd love to see someone prove me wrong though!

It seems like Scala is the closest to getting there right now.

时光匆匆的小流年 2024-09-11 09:58:26

我不确定其他 JVM 语言的性能如何,但我确实认为 Scala 是可以用于严肃的 Android 项目的语言。

当然它有一些问题(比如如果没有一些解决方法,Google Maps Android API 就无法使用),但它与默认的 Android SDK 配合得很好。

我个人使用Scala开发我的Android应用程序(Maidroid Reminder),根据Android Market的统计,该应用程序已经被下载了大约5000次。

当然,它不是一个“突出”的应用程序,但它使用了 Android SDK 的很多功能,如 ContentProvider/Broadcast Receiver/MediaPlayer.... 等,而且它运行得很好,我觉得比用 Java 编码有趣得多。

使用 Scala 开发 Android 应用程序的最大好处是用户不需要像 Android 脚本环境那样安装任何运行时!

只需发布您的 APK 文件,用户就可以使用 Android Market 或 ADB 安装您的应用程序。

如果有人对用 Scala 编写的 Android 应用程序的外观感兴趣,您可以在 GitHub 浏览源代码。

I'm not sure how other JVM language performs, but I really think Scala is the one that could use for a serious Android project.

Of course it has some problem (like Google Maps Android API is not usable without some workaround), but it works very well with the default Android SDK.

I personally use Scala to develop my Android application (Maidroid Reminder) which is already been download about 5000 times according to the statistic of Android Market.

It's not a "prominent" application of course, but it uses lots of feature of Android SDK, like ContentProvider/Broadcast Receiver/MediaPlayer.... etc, and it works very well and I felt much more fun than coding in Java.

And the best thing of using Scala to develop Android application is that the user don't need install any runtime like Android Scripting Environment needs!

Just release your APK file, and the user could install your application using Android Market or ADB.

If anyone is interested in how an Android application written in Scala looks like, you may browse the source code at GitHub.

醉梦枕江山 2024-09-11 09:58:26

经过一番搜索,似乎已经存在一个 JRuby 脚本环境安卓平台。

From a little searching it looks like there already exists a JRuby scripting environment for the Android platform.

秋风の叶未落 2024-09-11 09:58:26

目前大多数动态语言在 Android Dalvic JVM 上表现不佳。它们将运行,但 CPU 和内存使用量可能超出您的预期。我听说他们正在努力改进这一点。

Currently most dynamic languages perform poorly on the Android Dalvic JVM. They will run but with more CPU and memory useage than you probably want. I hear they are working on improving that though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文