最近因为项目需要下载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: protocol family unavailable问题的几种方法

    Android Studio从版本1.5更新到2.1之后,打开Android Studio一直提示: gradle project refresh failed: protocol family un ...

  4. android studio学习----The project encoding (windows-1252) does not match the encoding specified in the Gradle build files (UTF-8)

    Warning:The project encoding (windows-1252) does not match the encoding specified in the Gradle buil ...

  5. Android Studio解决unspecified on project app resolves to an APK archive which is not supported

    出现该问题unspecified on project app resolves to an APK archive which is not supported as a compilation d ...

  6. 解决 Your project contains error(s),please fix them before running your application问题

    原文地址: Android笔记:解决 Your project contains error(s),please fix them before running your application问题 ...

  7. Android笔记:解决 Your project contains error(s),please fix them before running your application问题

    解决 Your project contains error(s),please fix them before running your application问题 貌似好多人都有遇到这问题,而且网 ...

  8. 解决 Your project contains error(s),please fix them before running your applica ..

    解决 Your project contains error(s),please fix them before running your application问题 http://www.cnblo ...

  9. Android Studio 解决unspecified on project app resolves to an APK archive which is not supported

    出现该问题unspecified on project app resolves to an APK archive which is not supported as a compilation d ...

随机推荐

  1. Dell R730服务器 Raid5配置

    Dell R730服务器,有7块5t硬盘,默认做的RAID5.我们的目的是取其中6块硬盘做RAID5,留一块硬盘做热备. 一块SSD系统盘. 在这里,我具体解释一下 ①6块硬盘做成RAID5 ②6块硬 ...

  2. AndroidStudio打包apk,安装出现签名冲突--解决办法

    Android UiAutomator2项目部署到jenkins上,实现自动打包,并自动push&安装到设备上 遇到问题: 可成功实现自动打包并push到设备上后,install -r 的时候 ...

  3. odoo开发笔记 -- 模型一对多tree视图弹窗效果实现

    实现效果参考: 1. 开发者模式 -- 设置 -- 工作流 -- 编辑 -- 添加项目 2. 会计模块 -- 管理 -- 付款条款 -- 编辑/创建 实现方式,很简单.只要视图界面写个一对多关联字段就 ...

  4. js中编写velocity逻辑

    <script type="text/javascript"> $(function(){ #foreach( $var in $entity.showConfigs ...

  5. 全网最详细的Windows系统里PLSQL Developer 64bit的下载与安装过程(图文详解)

    不多说,直接上干货! ORACLE是数据库,有客户端和服务器: 其,具体下载,可见http://www.oracle.com/technetwork/database/enterprise-editi ...

  6. docker内存和cpu调试

    本地启动了一个sshd的容器服务,但该容器经常会被重启导致ssh连接失败,使用kubectl describe pod命令查看改命令发现有容器返回值为137,一般是系统环境原因,且一般为内存不足导致的 ...

  7. JDBC中链接数据库前为什么要用Class.forName(驱动类)加载驱动类?

    使用JDBC链接数据库时,为什么要先使用Class.forName(String name)来加载类? 答: 实际上就是为了加载类时,调用静态初始化块中的注册函数. 可以看一下MySql的Driber ...

  8. 资深程序员的Metal入门教程总结

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由落影发表于云+社区专栏 正文 本文介绍Metal和Metal Shader Language,以及Metal和OpenGL ES的差异 ...

  9. 学了近一个月的java web 感想

    对于每天学习的新知识进行一定的总结,是有必要的. 之前我学的每一门知识,我都没有怎么总结自己的问题,也没有怎么去想想该怎样才能学的更好,把知识掌握的更牢固.从现在开始呢,我会每半个月,或每一个月总结总 ...

  10. PPT定时器小记

    在日常会议汇报中,往往会出现超时的情况.此时需要一种优雅提醒讲演者加快速度的方式.PPT定时器就是其中的一种方法. ppttimer,一款在GitHub上发布的开源软件,基本能满足我在本项工作中的需求 ...