Android Stduio配置NDK步骤:
一:下载NDK工具包,网上很多,自行在下。
二:解压工具包,获得ndk-bundle文件夹,一般会将此文件夹放入SDK的根目录下,方便寻找(放哪不影响使用,但路径不能有空格和中文)。
三:配置NDK环境变量,在Path环境变量添加ndk-bundle路径。
四:新建项目在local.properites文件中加入ndk-bundle的路径,例如:
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Fri Dec 23 10:21:35 CST 2016
ndk.dir=E\:\\Android\\sdk\\ndk-bundle
sdk.dir=E\:\\Android\\sdk
格式如上,ndk-bundle的路径为E:\Android\sdk\