Android中可以使用哪些编程语言进行开发?

发布于 2024-09-27 14:27:18 字数 328 浏览 2 评论 0原文

可能的重复:
我可以在 Android Dalvik 上使用哪些编程语言?

大多数 Android 应用程序都是用 Java 编写的。但我听说也可以使用 Scala 或其他一些语言。我还了解到可以包含本机 C/C++ 代码。

是否有可用的参考/列表来显示可以使用哪些语言?

Possible Duplicate:
Which programming languages can I use on Android Dalvik?

Mostly, Android applications are written in Java. But i heard that its also possible to use Scala or some other languages. And I also read that it's possible to include native C/C++ code.

Is there a refernce/list available that shows which languages can be used?

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

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

发布评论

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

评论(7

千秋岁 2024-10-04 14:27:18
  • 发布时,Java 是唯一官方支持的用于构建可分发第三方 Android 软件的编程语言。

  • Android 本机开发套件 (Android NDK),允许开发人员使用 CC++ 构建 Android 软件组件。

  • 除了提供对本机代码的支持之外,Google 还扩展了 Android 以支持流行的动态脚本语言。本月早些时候,Google 推出了Android 脚本环境 (ASE) 允许第三方开发人员使用 perlJRubyPythonLUABeanShell。要了解 ASE 的想法和用法,请参阅此 示例链接

  • Scala 也受支持。有关 Scala 的示例,请参阅这些 示例 link-1 , 示例 link-2 , 示例 link-3

  • 刚才我已经提到了一个 文章,其中我发现了一些有用的信息,如下所示:

    1. 编程语言是 Java,但存在来自其他语言的桥梁(C# .net - Mono 等)
    2. 可以运行LUAPerlPythonBeanShell等脚本语言。
  • 我已阅读第二篇文章 Google 发布“简单”Android 编程语言。例如,参考此

  • 刚刚(2010年8月2日)我读了一篇文章,介绍了“Frink Android 编程语言和计算工具”,请参阅此链接 Link-1 Link-2

  • 2010年8月4日,我发现了关于RenderScript。基本上,它是一种用于高性能图形编程的类 C 语言,可帮助您在 Android 应用程序中轻松编写高效的视觉效果和动画。由于尚未完成,因此尚未发布。

  • At launch, Java was the only officially supported programming language for building distributable third-party Android software.

  • Android Native Development Kit (Android NDK) which will allow developers to build Android software components with C and C++.

  • In addition to delivering support for native code, Google is also extending Android to support popular dynamic scripting languages. Earlier this month, Google launched the Android Scripting Environment (ASE) which allows third-party developers to build simple Android applications with perl, JRuby, Python, LUA and BeanShell. For having idea and usage of ASE, refer this Example link.

  • Scala is also supported. For having examples of Scala, refer these Example link-1 , Example link-2 , Example link-3 .

  • Just now i have referred one Article Here in which i found some useful information as follows:

    1. programming language is Java but bridges from other languages exist (C# .net - Mono, etc).
    2. can run script languages like LUA, Perl, Python, BeanShell, etc.
  • I have read 2nd article at Google Releases 'Simple' Android Programming Language . For example of this, refer this .

  • Just now (2 Aug 2010) i have read an article which describes regarding "Frink Programming language and Calculating Tool for Android", refer this links Link-1 , Link-2

  • On 4-Aug-2010, i have found Regarding RenderScript. Basically, It is said to be a C-like language for high performance graphics programming, which helps you easily write efficient Visual effects and animations in your Android Applications. Its not released yet as it isn't finished.

晨曦慕雪 2024-10-04 14:27:18

以下是可用于在 Android 上进行开发的语言列表:

  • Java - 主要 Android 开发语言

  • Kotlin,来自 JetBrains 的语言,获得了 Google 的第一方支持,在 Google I/O 2017 上宣布

  • C++ - NDK 用于库,而不是应用程序

  • Python、bash 等。等人。 - 通过脚本环境

  • Corona - 一种是使用 Corona SDK 。 Corona 是一个基于 Lua 编程语言构建的高级 SDK。 Lua 比 Java 更容易学习,而且 SDK 消除了开发 Android 应用程序的很多痛苦。

  • Cordova - 使用 HTML5、JavaScript、CSS,并且可以使用 Java 进行扩展

  • Xamarin 技术 - 使用 c#,其中使用了 mono。这里 MonoTouch 和 Mono for Android 是公共语言基础设施 (CLI) 和公共语言规范的跨平台实现。

至于你的第二个问题:android高度依赖于它的java架构,我发现短期内不太可能有其他主要的开发语言可用。然而,没有什么特别的原因可以解释为什么有人不能在 Java 中实现另一种语言(例如 Jython)并使用它。然而,这肯定不会比用 Java 编写代码更容易或更高效。

Here's a list of languages that can be used to develop on android:

  • Java - primary android development language

  • Kotlin, language from JetBrains which received first-party support from Google, announced in Google I/O 2017

  • C++ - NDK for libraries, not apps

  • Python, bash, et. al. - Via the Scripting Environment

  • Corona- One is to use the Corona SDK . Corona is a high level SDK built on the Lua programming language. Lua is much simpler to learn than Java and the SDK takes away a lot of the pain in developing Android app.

  • Cordova - which uses HTML5, JavaScript, CSS, and can be extended with Java

  • Xamarin technology - that uses c# and in which mono is used for that. Here MonoTouch and Mono for Android are cross-platform implementations of the Common Language Infrastructure (CLI) and Common Language Specifications.

As for your second question: android is highly dependent on it's java architecture, I find it unlikely that there will be other primary development languages available any time soon. However, there's no particular reason why someone couldn't implement another language in Java (something like Jython) and use that. However, that surely won't be easier or as performant as just writing the code in Java.

子栖 2024-10-04 14:27:18

支持 Scala。请参阅示例

对其他语言的支持有问题

7) 诸如 dx 工具之类的东西可以强制进入手机,以便 Java 代码原则上可以继续生成字节码,但将它们转换为 VM 可运行的形式。但是,目前 Java 代码无法即时生成。这意味着 Dalvik 无法运行动态语言(JRuby、Jython、Groovy)。然而。 (也许 dex 格式需要一个可以从字节码轻松生成的失谐变体。)

Scala is supported. See example.

Support for other languages is problematic:

7) Something like the dx tool can be forced into the phone, so that Java code could in principle continue to generate bytecodes, yet have them be translated into a VM-runnable form. But, at present, Java code cannot be generated on the fly. This means Dalvik cannot run dynamic languages (JRuby, Jython, Groovy). Yet. (Perhaps the dex format needs a detuned variant which can be easily generated from bytecodes.)

◇流星雨 2024-10-04 14:27:18

如上所述,Android 中可以使用多种语言进行开发。 Java、C、Scala、C++、多种脚本语言等。借助 Mono,您还可以使用 C# 和 .Net 框架进行开发。这里有一些速度比较:http://www.youtube.com/watch?v=It8xPqkKxis< /a>

As stated above, many languages are available for developing in Android. Java, C, Scala, C++, several scripting languages etc. Thanks to Mono you are also able to develop using C# and the .Net framework. Here you have some speedcomparisions: http://www.youtube.com/watch?v=It8xPqkKxis

凌乱心跳 2024-10-04 14:27:18

Clojure 可以使用,但速度很慢。

另请参阅:Android 版 Clojure 分支,以及 教程

Clojure can be used, but it's slow.

See also: Clojure fork for Android, and a tutorial.

半衬遮猫 2024-10-04 14:27:18

我使用 Scala 获得了很好的体验。

我使用简单的构建工具(sbt:http://code.google.com/ p/simple-build-tool/) 和 Android 插件 (http://github .com/jberkel/android-plugin

I made good experiences with Scala.

I use the simple build tool (sbt: http://code.google.com/p/simple-build-tool/) with the Android-Plugin (http://github.com/jberkel/android-plugin)

画尸师 2024-10-04 14:27:18

Java 和 C:

  • C 用于低级功能和设备连接
  • Java 用于框架和应用程序级

您可以在 Android 开发人员网站中找到更多信息。

Java and C:

  • C used for low level functionalities and device connectivities
  • Java used for Framework and Application Level

You may find more information in Android developers site.

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