Android studio哪里可以安装NDK文件? (以zip下载) [英] Android studio Where to install NDK file? (downloaded it in zip)
问题描述
我的android studio表示要更新.但是,当我尝试更新时,它却无法正常工作,因此我必须启动:
C:\Users\username\AppData\Local\Android\sdk\tools\android.bat
安装其他软件包.但是NDK文件不会更新,因此我从以下位置手动下载了文件:
My android studio said it wanted to update. But when I did I tried to update it but it wouldn't work so I had to launch:
C:\Users\username\AppData\Local\Android\sdk\tools\android.bat
to install other packages. But the NDK file wouldn't update, so I manually downloaded it from:
https://developer.android.com/ndk/downloads/index. html#download
现在我有了这个zip
文件,应该在哪里提取文件夹?感谢您的帮助!
Now I have this zip
file and where should I extract the folder? Grateful for any help!!
文件夹名称为android-ndk-r13b
.
推荐答案
是的,重命名提取的文件夹 android-ndk-r13b
(确切的名称可能很快就会过时. )到 ndk-bundle
(您可以将NDK
[和SDK
放在此位置] 任意位置,如果您想{这样,我肯定会看到一种情况的硬编码子路径}),然后
将设置点指向放置它的位置 .
Yes, rename the extracted folder android-ndk-r13b
(probably the exact name will be outdated someday soon) to ndk-bundle
(you can put the NDK
[and SDK
for that matter] anywhere, and leave the name alone if you want {do not do this, I'm sure seen one case of hard-coded sub-path}),
then, make the settings point to the location where you put it.
Android Studio
,File menu | Project Structure
Ctrl + Alt + Shift + s
(短-cut:ctrl + Alt + Shift + s):
Android Studio
, File menu | Project Structure
Ctrl+Alt+Shift+s
(short-cut: ctrl+Alt+Shift+s):
设置/检查以下environmental variables
可能对您也有帮助:
It might also be helpful to you to set/check the following environmental variables
:
NDK_HOME=C:\Android\sdk\ndk-bundle
NDK_MODULE_PATH=C:\Android\sdk\ndk-bundle
其他内容:
正在执行environmental variables
时(SDK
的括号):
EXTRA stuff:
While were doing environmental variables
(belt-and-braces for SDK
):
ANDROID_HOME=C:\Android\sdk
对于JDK:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_112
JAVA_PATH=C:\Program Files\Java\jre1.8.0_112\bin
JDK 是Java开发工具包.
JRE 是Java运行时环境.
JDK is the Java Development Kit.
JRE is the Java Run-time Environment.
如果Gradle
的内存(RAM
)上的紧(700 MB大约是您可以使用的最低容量,那么其他工具,例如monitor.bat
也使用此变量,则为无处不在)(很明显,您想要将其尽可能大,而无需交换以使其极其构建缓慢(请注意,下划线非常重要![保留的名称空间冲突运算符,请不要让我解释它非常复杂!]}):
If your tight on memory (RAM
) for Gradle
(700 Megabytes is about as low as you can go, other tools like monitor.bat
use this variable too, it's ubiquitous) (clearly you want to make it as big a possible, without swapping making it extremely slow to build {note the underscore VERY important ! [it's a reserved name space conflict operator, don't ask me to explain it's VERY complicated !]}):
_JAVA_OPTIONS=-Xmx700m
某些链接
设置Android NDK开发
将C和C ++代码添加到您的项目中
NDK入门
使用C和C ++使用NDK在Android应用中编写代码
Some Links
Setting up for Android NDK development
Add C and C++ Code to Your Project
Getting Started with the NDK
Using C and C++ Code in an Android App with the NDK
这篇关于Android studio哪里可以安装NDK文件? (以zip下载)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!