9

Androidアプリの構築を開始しようとしています(現在、Webサービスとデータベースに取り組んでいます)。Javaを使用するか、CまたはC ++に直接コーディングするかで、アプリの速度に大きな違いがあるかどうかを知りたいです。 。

このアプリには複雑なグラフィックや物理演算は含まれておらず、その速度は主に、RESTWebサービスとの間の複数のオブジェクトの転送速度に依存します。

前もって感謝します

4

3 に答える 3

18

Google says you probably should just stick with Java:

Before downloading the NDK, you should understand that the NDK will not benefit most apps. As a developer, you need to balance its benefits against its drawbacks. Notably, using native code on Android generally does not result in a noticable performance improvement, but it always increases your app complexity. In general, you should only use the NDK if it is essential to your app—never because you simply prefer to program in C/C++.

Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on. When examining whether or not you should develop in native code, think about your requirements and see if the Android framework APIs provide the functionality that you need.

于 2013-03-06T22:24:27.920 に答える
3

Android用にこれをゼロから構築していると述べたので、NDKの使用はお勧めしません。Google は、上記の理由から NDK を使用すべきではないと具体的に述べています

于 2013-03-06T22:26:21.450 に答える
0

Java を使用し、Spring for Android で REST Web サービスを使用することをお勧めします。それらを消費するのは簡単すぎます。現在、それを使用して Android Play ストアで 1 つのアプリを公開しています。ソース コードは GitHub にあります。ご覧ください。

幸運を!

于 2013-03-07T02:22:54.133 に答える