简体   繁体   English

Android:使用NDK构建本机GUI应用程序?

[英]Android: build native GUI app with NDK?

independent from the fact if it makes sense or not, if it is a good way to create Android apps or not: for (educational/personal/whatever) reasons I want to create an Android app with graphical user interface in C++ using the NDK. 独立于有意义的事实,如果它是一个创建Android应用程序的好方法:因为(教育/个人/其他)原因我想用C ++使用NDK创建一个带有图形用户界面的Android应用程序。

What I found so far are some information about the NDK, how to create native libraries and how to access them out of Java applications. 到目前为止,我发现了一些关于NDK的信息,如何创建本机库以及如何从Java应用程序中访问它们。 But what I'm really looking for are some information how to create a View and to add graphical user interface elements to that View out of my C++ NDK app. 但我真正想要的是一些信息,如何创建一个视图,并从我的C ++ NDK应用程序中添加图形用户界面元素到该视图。

Any ideas and hints how that can be done or where some more information/HOWTOs can be found regarding this? 任何想法和提示如何做到这一点或在哪里可以找到更多的信息/ HOWTOs?

Juce is a fantastic C++ UI framework that works well on Android. Juce是一个出色的C ++ UI框架,适用于Android。

It can be used under the GPL or a paid-for commercial licence. 它可以在GPL或付费商业许可下使用。 The community is fairly active and the author is very friendly and helpful. 社区相当活跃,作者非常友好和乐于助人。 I found it relatively easy to build using the NDK tools on Windows. 我发现在Windows上使用NDK工具构建相对容易。

Caveat - it seems Android isn't a high priority platform for them, so some things are missing at time of writing (eg support for hardware buttons). 警告 - 似乎Android不是他们的高优先级平台,因此在编写时有些东西缺失(例如支持硬件按钮)。 Still, in my experience, the UI framework does work very well on Android, and that's what your question is about. 不过,根据我的经验,UI框架在Android上运行得非常好,这就是你的问题所在。

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

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