我尝试着将一款游戏移植到Android上,但它是基于C语言,而Android也支持Java,但我相信一定有一种方法能够将C应用带到Android上,有人知道如何实现这一目标吗?


当前回答

谷歌刚刚发布了NDK。

http://feedproxy.google.com/~r/blogspot/hsDu/~3/2foWz7hwFtE/introducing-android-15-ndk-release-1.html

可以在这里找到: http://developer.android.com/sdk/ndk/1.5_r1/index.html

其他回答

有一个计划,允许C/ c++库在Android的下一个SDK版本(代号Eclair?)到目前为止,这还不能通过Android Java SDK实现。但是,您可以获取HUGE开源项目,滚动您自己的库,然后刷新您自己的设备……但是任何想要使用你的库的人都必须同时刷新你的自定义构建。

从这一点来看,似乎是有可能的:

http://openhandsetmagazine.com/2007/11/running-c-native-applications-on-android-the-final-point/(现在只能通过WayBack Machine购买)

"the fact is only Java language is supported doesn’t mean that you cannot develop applications in other languages. This have been proved by many developers, hackers and experts in application development for mobile. The guys at Elements Interactive B.V., the company behind Edgelib library, succeeded to run native C++ applications on the Android platform, even that at this time there is still many issues on display and sound … etc. This include the S-Tris2 game and a 3D animation demo of Edgelib."

谷歌刚刚发布了NDK。

http://feedproxy.google.com/~r/blogspot/hsDu/~3/2foWz7hwFtE/introducing-android-15-ndk-release-1.html

可以在这里找到: http://developer.android.com/sdk/ndk/1.5_r1/index.html

自2009年以来,这一问题有了进展。 用于Android的Qt(c++框架) 视频开始。

谷歌发布了一个本地开发工具包(NDK)(根据http://www.youtube.com/watch?v=Z5whfaLH1-E在00:07:30)。

希望这些信息能在谷歌的群组页面(http://groups.google.com/group/android-ndk)上更新,因为上面说还没有发布。

我不确定从哪里可以得到一个简单的下载,但我听说你可以从谷歌的Git存储库在甜甜圈分支下获得一个NDK的副本。