简体   繁体   English

如何找到NDK的路径?

[英]How to find the path to NDK?

I installed NDK using Android Studio (SDK Manager).我使用 Android Studio(SDK 管理器)安装了NDK Where is the default directory of NDK for Mac? NDK for Mac 的默认目录在哪里? How do I find the path to it?我如何找到它的路径?

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的子目录中.

You can find it on $ANDROID_SDK_PATH/ndk-bundle.您可以在 $ANDROID_SDK_PATH/ndk-bundle 上找到它。 ANDROID_SDK_PATH is your SDK path which I suppose you have set it already. ANDROID_SDK_PATH 是您的 SDK 路径,我想您已经设置了它。

find it here if installed android studio如果安装了 android studio,请在此处找到

C:\Users\Your_user_name\AppData\Local\Android\Sdk\ndk

if you can't find it there, download it through android studio like in my attached image如果你在那里找不到它,请通过 android studio 下载它,就像我附加的图片中一样在此处输入图像描述 or you can get it manually或者你可以手动获取

Finding your SDK/NDK library path needs information about how you installed them.查找您的 SDK/NDK 库路径需要有关您如何安装它们的信息。 However, there are two possible solutions to find them但是,有两种可能的解决方案可以找到它们

  1. Using Android Studio: the possible way to find is using Android Studio.使用 Android Studio:查找的可能方法是使用 Android Studio。 Open your Android Studio Preference (or "File->Settings") > Appearance & Behavior > System Settings > Android SDK.打开您的 Android Studio 首选项(或“文件->设置”)> 外观和行为 > 系统设置 > Android SDK。 You can find the path to your SDK and NDK, which is in the same directory.您可以找到 SDK 和 NDK 的路径,它们位于同一目录中。
  2. Using Terminal: Open Terminal and put the command as below.使用终端:打开终端并输入如下命令。 Hopefully, if ANDROID_HOME environment has been set.希望如果 ANDROID_HOME 环境已经设置。

    echo $ANDROID_HOME回声 $ANDROID_HOME

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

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