AS配置NDK外部工具
2016-11-16 14:14
218 查看
#
增加javah、ndk-build、ndk-build clean 三个命令
对于我,对应的参数是:
报错:
1
参考 []http://blog.csdn.net/tommy996633/article/details/51126804] 配置外部工具NDK增加javah、ndk-build、ndk-build clean 三个命令
对于我,对应的参数是:
-d ..\jni $FileClass$ $ModuleFileDir$\src\main\java\ E:\zhangbin\Android\android-sdk\ndk-bundle $ModuleFileDir$\src\main\jni
报错:
Error:Execution failed for task ':app:compileDebugNdk'. > Error: Your project contains C++ files but it is not using a supported native build system. Consider using CMake or ndk-build integration with the stable Android Gradle plugin: https://developer.android.com/studio/projects/add-native-code.html or use the experimental plugin: http://tools.android.com/tech-docs/new-build-system/gradle-experimental.[/code]
-这是因为AS想自己自动生成Android.mk进行编译,而不是用你弄好的。
-解决办法是,在app的build.gralde里,jni.srcDirs置空,参考[]http://stackoverflow.com/questions/27453085/execution-failed-for-task-appcompiledebugndk-failed-to-run-this-command-ndk]//added for jni begin ndk { moduleName "hellocjni" abiFilters "armeabi-v7a" } sourceSets.main { jni.srcDirs = []//disable automatic ndk-build call jniLibs.srcDir "src/main/libs" } //added for jni end2 默认的NDK工程是使用cmake支持C++的
我现在代码是c的
相关文章推荐
- Android Studio配置NDK外部命令工具
- svn配置外部的比较工具
- android-ndk-r7b编译环境Cygwin工具搭建及配置
- Android Studio使用新的Gradle构建工具配置NDK环境
- eclipse配置外部工具利用javah一键生成头文件
- Mac环境下ADT工具配置ndk
- VSS配置外部对比工具Beyond Compare
- Android Studio如何下载NDK及使用新的Gradle构建工具配置NDK环境
- Android Studio使用新的Gradle构建工具配置NDK环境
- Android Studio使用新的Gradle构建工具配置NDK环境
- TortoiseSVN配置外部对比工具
- eclipse配置外部工具利用javah编译生成头文件
- Windows下给SourceTree配置外部比较工具BeyondCompare
- jni开发之配置ndk、Javap、javah命令工具
- Android开发——Android Studio使用新的Gradle构建工具配置NDK环境
- android-ndk-r7b编译环境Cygwin工具搭建及配置
- eclipse配置外部工具利用javah编译生成头文件
- eclipse配置外部工具利用javah编译生成头文件
- Android开发——Android Studio使用新的Gradle构建工具配置NDK环境
- AS NDK开发配置