如何解决Your project contains C++ files but it is not using a supported native build system
最近因为项目需要下载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的更多相关文章
- Error: Your project contains C++ files but it is not using a supported native build system
我在编写有关JNI的代码的时候回报这个错误,我在网上搜了相关的资料后,找到了一篇文章解决了这个问题,点击这里查看这篇文章,我在照着这篇文章尝试的时候,总有一些错误,现在我把自己详细的解决流程贴出来,供 ...
- 解决eclipse project前出现红色感叹号 但没有提示错误出在什么地方build path jar包也没报错
在problems窗体能够看到错误信息 菜单条 window-->show view-->problems 或alt+shift+q 然后按x 又一次选一下包就攻克了
- 解决gradle project refresh failed: protocol family unavailable问题的几种方法
Android Studio从版本1.5更新到2.1之后,打开Android Studio一直提示: gradle project refresh failed: protocol family un ...
- 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 ...
- 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 ...
- 解决 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问题 ...
- 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问题 貌似好多人都有遇到这问题,而且网 ...
- 解决 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 ...
- 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 ...
随机推荐
- vue教程1-01 v-model 一般表单元素(input) 双向数据绑定
vue教程1-01 v-model 一般表单元素(input) 双向数据绑定el:'#box',//这里放的是选择器.不然会不生效 <!DOCTYPE html> <html l ...
- odoo datetime 直接修改模版语言 去掉时分秒
<field name='date_order' widget='date'/> 利用date widget即可使dateime类型的显示为date.
- date命令使用文档.txt
date命令的帮助信息 [root@localhost source]# date --help用法:date [选项]... [+格式] 或:date [-u|--utc|--universal] ...
- Git使用(1)
安装git完成后 1.首先配置你的用户信息,用于体现在你的提交记录中包含your name and your email git config --global user.name "you ...
- jieba分词(2)
结巴分词系统中实现了两种关键词抽取法,一种是TF-IDF关键词抽取算法另一种是TextRank关键词抽取算法,它们都是无监督的算法. 以下是两种算法的使用: #-*- coding:utf-8 -*- ...
- 把 Elasticsearch 当数据库使:聚合后排序
使用 https://github.com/taowen/es-monitor 可以用 SQL 进行 elasticsearch 的查询.有的时候分桶聚合之后会产生很多的桶,我们只对其中部分的桶关心. ...
- 研究CondItem
- java学习碰到死胡同了
一个月前看了java的异常处理,有点凌乱,各种异常好不习惯,特别是那个throws和throw,现在好多了,编程中使用打异常抛出没啥问题了,只是线程和输出输入流又遇到问题了,线程刚学,了解了Threa ...
- DataSet 多表关系
protected void Page_Load(object sender, EventArgs e) { string connectionString = @"Data Source= ...
- SSH-公私钥认证
Linux下SSH的认证方式有两种,即密码认证和公私钥认证. 我们在日常的安全维护中,出于安全的考虑,密码不明文存放,会使用公私钥认证方式.这个时候我们就需要使用ssh-keygen,ssh-keyg ...