如何解决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 ...
随机推荐
- node-rsa非对称加密
写在最前:此文的目的是介绍编码,减少刚接触时的弯路,所以内容且不做详细累述 一.使用 node-rsa 进行非对称加解密 因为 比特币 中使用的非对称加密,所以在npm中对比找到一个比较方便也直观的库 ...
- asp.net core中遇到需要自定义数据包解密方法的时候
最近将公司的项目用.netcore重写, 服务的http外部接口部分收发消息是DES加解密的, 那么在asp.net core mvc的action处理之前需要加入解密这个步骤. 我第一想到的是用fi ...
- (转)Python3 模块3之 Urllib之 urllib.parse、urllib.robotparser
原文:https://blog.csdn.net/qq_36148847/article/details/79153738 https://blog.csdn.net/zly412934578/art ...
- Android众说纷纭分辨率
Andoid最被人诟病的就是显示屏的各种不同尺寸和不同分辨率.由于Android厂商的纷繁多样,导致出现了不同尺寸和不同分辨率的手机,指示开发者需要兼容各种手机屏幕.本文想学习的就是Android的显 ...
- logstash笔记(一)——redis&es
下载地址: https://www.elastic.co/downloads 版本:logstash-2.2.2 两台linux虚拟机,一台windows宿主机 shipper: 192.168.22 ...
- vue实现城市列表选择
成果展示 最后的成果就是下面所展示的内容,因为gif图没有做,只能截图所展示,接下来,会带着大家一步一步的完成下面功能,脚手架搭建和node安装在本次案例不会讲解,如果了解,可以在我的博客园找到有详细 ...
- SVN Hooks的介绍及使用
阅读此篇文章你可以: 对SVN Hooks有一定的了解 获取两个最常用的SVN Hooks案例 SVN hooks介绍 Hooks 钩子,主要实现的功能就是在特定事件发生之前或者之后自动执行事先定义好 ...
- 2015年第六届蓝桥杯C/C++程序设计本科B组决赛 完美正方形
完美正方形 如果一些边长互不相同的正方形,可以恰好拼出一个更大的正方形,则称其为完美正方形.历史上,人们花了很久才找到了若干完美正方形.比如:如下边长的22个正方形 2 3 4 6 7 8 12 13 ...
- ThreadLocal剧集(一)
总述 最近做了一个日志调用链路跟踪的项目,涉及到操作标识在线程和子线程,线程池以及远程调用之间的传递问题.最终采用了阿里开源的TransmittableThreadLocal插件(https: ...
- [转](SQL Server) Convert a File from utf-8 to ANSI (such as Windows-1252)
本文转自:https://example-code.com/sql/charset_convert_file_from_utf8_to_ansi.asp CREATE PROCEDURE Chilka ...