linqy的个人博客分享 http://blog.sciencenet.cn/u/linqy

博文

[转载]Android解决 NDK not configured问题

已有 4849 次阅读 2019-2-15 11:06 |系统分类:科研笔记|文章来源:转载

问题描述:


//    Error:Execution failed for task ':SoftkeyApp:compileDebugNdk'.

//            > NDK not configured.

//    Download the NDK from http://developer.android.com/tools/sdk/ndk/.Then add ndk.dir=path/to/ndk in local.properties.

//            (On Windows, make sure you escape backslashes, e.g. C:\\ndk rather than C:\ndk)


这个问题一般是由于你的sdk版本过高导致NDK找不到导致错误的发生 

解决方法: 

①在你的local.properties文件中添加你的ndk路径


## 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.

#Wed Jan 27 14:00:08 CST 2016

sdk.dir=D\:\\YAOWork\\adt-bundle-windows-x86_64-20131030\\sdk

ndk.dir=D\:\\android-ndk-r10


②在你的build.properties配置文件里的android{}里面添加如下代码块(和defaultConfig{}同级)


sourceSets {

        main {

            jni.srcDirs = []

        }

    }

这样就没有问题了,可以运行了





https://wap.sciencenet.cn/blog-3134052-1162309.html

上一篇:Excel的一些函数操作
下一篇:C# 不同数组之间的转换Array、List、Dictionary
收藏 IP: 221.214.6.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-11 21:33

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部