Java 如何找到NDK的路径?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40520324/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to find the path to NDK?
提问by Lucky_girl
I installed NDK
using Android Studio (SDK Manager). Where is the default directory of NDK
for Mac? How do I find the path to it?
我NDK
使用 Android Studio (SDK Manager) 安装。NDK
Mac的默认目录在哪里?我如何找到它的路径?
采纳答案by clownba0t
My understanding is that now the NDK bundle is being offered via the SDK Manager within Android Studio, it will install into the Android SDK directory as per the other components (platforms, build tools, support repositories, etc.) in the SDK Manager.
我的理解是,现在 NDK 包是通过 Android Studio 中的 SDK 管理器提供的,它将根据 SDK 管理器中的其他组件(平台、构建工具、支持存储库等)安装到 Android SDK 目录中。
You can check the location of the SDK directory itself via Android Studio -> Preferences... -> Appearance & Behavior -> System Settings -> Android SDK -> Android SDK Location field near the top of the panel.
您可以通过 Android Studio -> Preferences... -> Appearance & Behavior -> System Settings -> Android SDK -> Android SDK Location 字段靠近面板顶部来检查 SDK 目录本身的位置。
I've customised mine (it's editable) so I'm afraid I don't know what the default is, but if you check the contents of the directory listed in that field then the NDK should be installed into a subdirectory called ndk-bundle
.
我已经自定义了我的(它是可编辑的)所以恐怕我不知道默认值是什么,但是如果您检查该字段中列出的目录的内容,那么 NDK 应该安装到一个名为ndk-bundle
.
回答by rayworks
You can find it on $ANDROID_SDK_PATH/ndk-bundle. ANDROID_SDK_PATH is your SDK path which I suppose you have set it already.
您可以在 $ANDROID_SDK_PATH/ndk-bundle 上找到它。ANDROID_SDK_PATH 是您的 SDK 路径,我想您已经设置了它。
回答by Esmaeil MIRZAEE
Finding your SDK/NDK library path needs information about how you installed them. However, there are two possible solutions to find them
查找您的 SDK/NDK 库路径需要有关您如何安装它们的信息。但是,有两种可能的解决方案可以找到它们
- Using Android Studio: the possible way to find is using Android Studio. Open your Android Studio Preference (or "File->Settings") > Appearance & Behavior > System Settings > Android SDK. You can find the path to your SDK and NDK, which is in the same directory.
Using Terminal: Open Terminal and put the command as below. Hopefully, if ANDROID_HOME environment has been set.
echo $ANDROID_HOME
- 使用 Android Studio:查找的可能方法是使用 Android Studio。打开您的 Android Studio 首选项(或“文件->设置”)> 外观和行为 > 系统设置 > Android SDK。您可以找到 SDK 和 NDK 的路径,它们位于同一目录中。
使用终端:打开终端并输入如下命令。希望如果 ANDROID_HOME 环境已经设置。
回声 $ANDROID_HOME