最近因为项目需要下载Android终端模拟器(Android-Terminal-Emulator)源码进行调试编译,编译过程中出现报错
Error:Execution failed for task ':libtermexec:compileReleaseNdk'.
> 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:
https://developer.android.com/studio/build/experimental-plugin.html.
顿时不知道所以然,Google以后,在stackoverflow找到解决方法,
一、在项目的gradle.properties添加
android.useDeprecatedNdk=true
二、在module的build.gradle(Module:app)的buildTypes上面添加sourceSets属性
sourceSets {
main {
jni.srcDirs = []
}
}
buildTypes{
}
最后运行gradle脚本更新build,在编译module即可。
这个问题主要是因为Android studio以前使用ndkCompile后来废弃掉了,Android-Terminal-Emulator没有最近没有更新的缘故。具体的编译最新的NDK编译方式可以看官网
https://developer.android.com/studio/projects/add-native-code.html
参考链接:http://stackoverflow.com/questions/40065871/error-your-project-contains-c-files-but-it-is-not-using-a-supported-native-bu/40283476
https://developer.android.com/studio/projects/add-native-code.html
同行的网友也写过解决方案
http://blog.csdn.net/susubuhui/article/details/53057188
http://www.cnblogs.com/qianyukun/p/6405291.html

[笔记]如何解决Your project contains C++ files but it is not using a supported native build system相关推荐

  1. Error: Your project contains C++ files but it is not using a supported native build system

    我在编写有关JNI的代码的时候回报这个错误,我在网上搜了相关的资料后,找到了一篇文章解决了这个问题,点击这里查看这篇文章,我在照着这篇文章尝试的时候,总有一些错误,现在我把自己详细的解决流程贴出来,供 ...

  2. 解决eclipse project前出现红色感叹号 但没有提示错误出在什么地方build path jar包也没报错...

    在problems窗体能够看到错误信息 菜单条 window-->show view-->problems 或alt+shift+q 然后按x 又一次选一下包就攻克了

  3. 解决gradle project refresh failed

    最近重装系统了,然后重新安装了Android Studio 遇到一个坑,打开Studio创建项目后提示 gradle project refresh failed 各种找方法,网上看到过很多解决方案, ...

  4. MSSQL编程笔记四 解决count distinct多个字段的方法

    MSSQL编程笔记四 解决count distinct多个字段的方法 参考文章: (1)MSSQL编程笔记四 解决count distinct多个字段的方法 (2)https://www.cnblog ...

  5. Dlib学习笔记:解决dlib array2d转 OpenCV Mat时颜色失真

    Dlib学习笔记:解决dlib array2d转 OpenCV Mat时颜色失真 [尊重原创,转载请注明出处] http://blog.csdn.net/guyuealian/article/deta ...

  6. win 10 slmgr.vbs -xpr 无法运行,被豆麦笔记打开解决方法

    win 10 slmgr.vbs -xpr 无法运行,被豆麦笔记打开解决方法 参考文章: (1)win 10 slmgr.vbs -xpr 无法运行,被豆麦笔记打开解决方法 (2)https://ww ...

  7. Flashdevelop解决ANE报Not supported native extensions profile

    http://hi.baidu.com/silvanote/item/ac6495fac7123225743c4ccc 报 Not supported native extensions profil ...

  8. 错误“checking build system type... config.sub: missing argument”的解决办法

    背景:交叉编译avahi库时遇到错误"checking build system type... config.sub: missing argument" ,"conf ...

  9. IDEA解决:Unmapped Spring configuration files found.Please configure Spring facet.

    问题如下: 一个友好的提示,不会阻止你正常运行,但是强迫症患者看着很难受,查找资料后,成功消除,记录一下. 产生原因,spring的配置文件没有被IDEA所管理导致. 解决方法 打开Project S ...

  10. SilverLight学习笔记--如何解决Button不响应MouseLeftButtonDown与MouseLeftButtonUp事件的问题...

    在Silverlight 2 中的按钮不能响应MouseLeftButtonDown 和 MouseLeftButtonUp 事件,为解决此问题,我们可通过创建自定义按钮控件加以解决, 1.创建自定义 ...

最新文章

  1. mysql isnu_mysql和nginx服务是否正常监控脚本
  2. c位边上还有什么位_站c位是什么位置?众女星合影惠英红C位童瑶站边角,惠英红为何能站C位?...
  3. python字符串压缩字_gzip如何在Python中压缩字符串?
  4. 企业数据中心夏季冷却散热的十二大技巧
  5. linux cut性能,Linux cut
  6. pip报 No module named ‘pip‘ 错误
  7. centos8下搭建gotk3(go语言gtk库) x86_64-w64-mingw32交叉编译环境
  8. jquery复选框组清空选中的值_jQuery选取所有复选框被选中的值并用Ajax异步提交数据...
  9. 计算机网络具有双重性特点,计算机网络(本)_201806_模拟卷2_答案
  10. 调用cryptography密码学API接口计算SHA256/SHA1哈希摘要
  11. ADSL宽带拨号密码恢复
  12. matlab在xrd中的应用,XRD物相分析(Jade软件的应用).pdf
  13. Python使用Hprose
  14. 1+xbim证书含金量_bim证书哪个含金量高
  15. 微信小程序:三元表达式设置样式
  16. 编写函数(fun),通过函数调用,输入存款金额和存款年限,计算到期总金额和利息。
  17. 生产计划管理软件功能是什么?对生产管理有何好处?
  18. 日常记录,vue-table表格背景透明
  19. html期末作业代码网页设计——化妆品电商网站(4页) HTML+CSS+JavaScript 使用html+css实现一个静态页面(含源码)
  20. FE File Explorer Pro for Mac(强大的文件管理器)

热门文章

  1. 算法设计与分析(未完待续)
  2. (2)R包,GO.db调研(数据库构建角度解析)
  3. 【Gym 102134-E】Kth subtree【权值树状数组、二分统计第k大+dfs离线操作】
  4. trace (矩阵的迹) 的性质
  5. linux crontab怎么启动,【linux之crontab,启动】(示例代码)
  6. 计算机原理内存详解,【讲给小白的计算机原理】什么是内存,内存的作用?
  7. HashTable、ConcurrentHashMap、TreeMap、HashMap关于键值的区别
  8. 利用redis做网站每天访问量,好处节省空间,存上一亿个用户占用12M(理论上大概)...
  9. 技术人员,你的表达能力怎样?
  10. jmeter之自定义java请求性能测试