简体   繁体   English

如何使用Android Studio编译Android本机库?

[英]How to compile Android native library with Android Studio?

I am a new user of android studio and I am developing application based on native library(JNI) and eclipse is provide builder facilities for NDK-build. 我是android studio的新用户,我正在开发基于本机库(JNI)的应用程序,eclipse正在为NDK-build提供构建工具。 so any functionality available in android studio to build NDK 所以android studio中可用于构建NDK的任何功能

NDK integration is very basic, limited, and not documented (per the New Build System page ) at the time of this writing. 在撰写本文时,NDK集成是非常基础的,有限的,没有记录(根据新建系统页面 )。 There a couple of examples in the samples at the bottom of that page that illustrate how this can be done. 该页面底部的示例中有几个示例说明了如何完成此操作。 You can also check the Gradle Plugin User Guide periodically to see if any additional documentation is available. 您还可以定期检查Gradle Plugin用户指南 ,看看是否有任何其他文档可用。

Android Studio runs ndk-build automatically if you have a jni directory in your project root. 如果项目根目录中有jni目录,Android Studio会自动运行ndk-build。 I describe the minimal setup you need in my answer to a similar question . 我在回答类似问题时描述了你需要的最小设置。

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

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