简体   繁体   English

使用 JavaScript 编写前端和 Java 后端编写的 Android 应用程序是否算作本机?

[英]Does an Android app written with JavaScript for front end and Java for back end count as native?

I'm really confused with what native means.我真的很困惑原生的意思。 I thought it referred to apps written completely in Java.我以为它指的是完全用 Java 编写的应用程序。 I also heard that the top apps don't do hybrid development, they prefer native to stay advanced.我还听说顶级应用不做混合开发,他们更喜欢原生来保持先进。 However, I found that these guys use multiple languages for multiple different things.但是,我发现这些人使用多种语言处理多种不同的事情。 I'm new to coding and I have just finished learning JavaScript fundamentals and I am interested in developing Android apps.我是编码新手,刚刚学习完 JavaScript 基础知识,我对开发 Android 应用程序很感兴趣。 The native elitists have got me confused.本土精英让我感到困惑。 Please guide me.请指导我。

"Native code" is code that the hardware can run directly, without a software translation layer. “本机代码”是硬件可以直接运行的代码,无需软件翻译层。

For example, to run a JavaScript application you need an interpreter, and to run a Java application you need a JVM.例如,要运行 JavaScript 应用程序,您需要一个解释器,而要运行 Java 应用程序,您需要一个 JVM。 Neither of them are native.他们都不是本地人。 In comparison, applications developed in C and C++ languages typically are native.相比之下,以 C 和 C++ 语言开发的应用程序通常是原生的。

Most android applications are written in Java, and therefore are not native code.大多数 android 应用程序都是用 Java 编写的,因此不是本机代码。 To add native code to an Android application you need to use NDK: https://developer.android.com/ndk要将本机代码添加到 Android 应用程序,您需要使用 NDK: https://developer.android.com/ndk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM