Write applications in C or C++ for Android? [close

2020-01-25 03:24发布

I'm trying to develop/port a game to Android, but it's in C, and Android supports Java, but I'm sure there must be a way to get a C app on there, anyone knows of a way to accomplish this?

标签: c++ c android
20条回答
戒情不戒烟
2楼-- · 2020-01-25 03:46

Take a look at google ndk group it looks promising, first version of the NDK will be available in 1H2009.

Update: And it is released http://android-developers.blogspot.com/2009/06/introducing-android-15-ndk-release-1.html

查看更多
ゆ 、 Hurt°
3楼-- · 2020-01-25 03:47

Google has released a Native Development Kit (NDK) (according to http://www.youtube.com/watch?v=Z5whfaLH1-E at 00:07:30).

Hopefully the information will be updated on the google groups page (http://groups.google.com/group/android-ndk), as it says it hasn't been released yet.

I'm not sure where to get a simple download for it, but I've heard that you can get a copy of the NDK from Google's Git repository under the donut branch.

查看更多
倾城 Initia
4楼-- · 2020-01-25 03:48

The Android NDK is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. For certain types of apps, this can help you reuse code libraries written in those languages.

For more info on how to get started with native development, follow this link.

Sample applications can be found here.

查看更多
走好不送
5楼-- · 2020-01-25 03:48

Maybe you are looking for this?

http://www.mosync.com/

It is a middle layer for developing for several mobile platforms using c++.

查看更多
我欲成王,谁敢阻挡
6楼-- · 2020-01-25 03:48

Since 2009 there is a development on this matter.
Necessitas - Qt(C++ framework) for Android
Getting started video.

查看更多
兄弟一词,经得起流年.
7楼-- · 2020-01-25 03:50

You can download c4droid and then install the GCC plugin and install to your SD. From the shell I just traverse to the directory where the GCC binary is and then call it to make an on board executable.

find / -name gcc

/mnt/sdcard/Android/data/com.n0n3m4.droidc/files/gcc/bin/arm-linux-androideabi-gcc

cat > test.c

#include<stdio.h>
int main(){ 
 printf("hello arm!\n");
return 0;
}

./arm-linux-androideabi-gcc test.c -o test

./test

hello arm!

查看更多
登录 后发表回答