编写不易,如有转载,请声明出处:http://blog.csdn.net/zxc514257857/article/details/76560308
报错内容
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.
报错原因
出现错误后分析得知:AndroidStudio通过Import project导入Eclipse项目时没有将原文件夹中的so包倒入进来(不会自动倒入进来),需要手动复制进来
解决方法
将so包手动复制到项目中,然后通过两种方式将so文件引入项目:http://blog.csdn.net/zxc514257857/article/details/56534863 ,同步项目之后问题解决
另有其他情况可能导致此错误出现,解决方法可参考借鉴:http://blog.csdn.net/sweettool/article/details/71436575
----------因本人才疏学浅,如博客或Demo中有错误的地方请大家随意指出,与大家一起讨论,共同进步,谢谢!----------