您的位置:首页 > 编程语言 > C语言/C++

Eclipse项目转AndroidStudio报错:Your project contains C++ files but it is not using a supported native...

2017-08-01 22:29 609 查看
编写不易,如有转载,请声明出处: 梦回河口: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中有错误的地方请大家随意指出,与大家一起讨论,共同进步,谢谢!———-
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐