JNI基础(一)Android Studio 配置NDK

本文介绍了Android Studio配置NDK的详细步骤,包括下载NDK工具包,解压并放置到合适目录,设置环境变量,以及在项目配置文件中添加NDK路径。
摘要由CSDN通过智能技术生成

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\
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值