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

首先在工程目录下的gradle.properties文件的末尾加上一句:Android.useDeprecatedNdk=true

如图:



然后再在文件build.gradle(Module:app)里面的buildTypes类中添加一个这样的方法

sourceSets {
main {
jni.srcDirs = []
}
}

如下图所示



这样就可以编译成功了

Error: Your project contains C++ files but it is not using a supported native build system的更多相关文章

  1. 如何解决Your project contains C++ files but it is not using a supported native build system

    最近因为项目需要下载Android终端模拟器(Android-Terminal-Emulator)源码进行调试编译,编译过程中出现报错 Error:Execution failed for task ...

  2. Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. T

    错误提示: Severity Code Description Project File Line Suppression StateError This project references NuG ...

  3. Android Studio添加应用作为依赖时报错Error:Dependency MonthText:xlistview:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency. File: 及其解决方案

    Error:Dependency MonthText:xlistview:unspecified on project app resolves to an APK archive which is ...

  4. 【linux】安裝 PHP时出现error: Cannot find MySQL header files

    checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket locati ...

  5. souce insight出错 There was an error opening project

    souce insight出错 There was an error opening project: "...": Options->Preferences->Fol ...

  6. linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.

    linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 1 ...

  7. git commit 提交不了 error: pathspec 'project'' did not match any file(s) known to git.

    1. 问题--使用git将代码提交到码云,使用到以下命令时: git commit -m 'init project' # 报错 error: pathspec 'project'' did not ...

  8. 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 ...

  9. 解决mysql跟php不在同一台机器上,编译安装php服务报错问题:configure: error: Cannot find MySQL header files under /application/mysql.

    在编译安装php服务时报错: configure: error: Cannot find MySQL header files under /application/mysql. Note that ...

随机推荐

  1. gRPC异步处理应答

    gRPC异步处理应答 (金庆的专栏) gRPC的演示样例 greeter_async_client.cc 不算是异步客户端,它使用了异步请求.可是堵塞式等待应答,结果成为一个同步调用. std::st ...

  2. 有关怎样入门ACM

    想给大家看看   所以就弄了原创了,造成作者困扰请联系在下. 来源: 吴垠的日志 一些题外话 首先就是我为什么要写这么一篇日志.原因非常easy,就是由于前几天有个想起步做ACM人非常诚恳的问我该怎样 ...

  3. 開始:触摸MySQL

    学习MySQL.少不了安装一个MySQL数据库,安装想必非常easy,事实上也是.我下载了一个MySQL5.7.百度了一下安装步骤,就成功安装了.相对于Oracle来说要简单不少. 买了两本书,看了& ...

  4. 关于React组件之间如何优雅地传值的探讨

    闲话不多说,开篇撸代码,你可以会看到类似如下的结构: import React, { Component } from 'react'; // 父组件 class Parent extends Com ...

  5. JAVA入门[21]-Jedis操作redis示例

    本节目标 通过JedisPool获取Jedis示例,并完成对redis 简单的Key-value读写操作. 完整代码结构如下: redis服务端 在本地运行redis-server.exe,然后在re ...

  6. Elasticsearch全文搜索——adout

    现在尝试下稍微高级点儿的全文搜索——一项传统数据库确实很难搞定的任务. 搜索下所有喜欢攀岩(rock climbing)的雇员: curl -XGET 'localhost:9200/megacorp ...

  7. PHP对象注入 PHP Object Injection

    From:PHP Object Injection Last revision (mm/dd/yy): 01/7/2015 译者:李秋豪 Wednesday, 24. May 2017 05:48PM ...

  8. 仔细讲解socket(转载https://www.zybuluo.com/phper/note/47110)

    老实讲,到目前为止,我对socket一无所知,真的.我就现学现卖用过nodejs平台的socket.io搭建过一套高可用实时性的网页聊天系统,其他,就真的只是听过它. 今天就来仔仔细细的学一下,soc ...

  9. 17089 最大m子段和

    17089 最大m子段和 时间限制:1000MS  内存限制:65535K提交次数:0 通过次数:0 题型: 编程题   语言: G++;GCC;VC Description "最大m子段和 ...

  10. 数据分析与展示——Matplotlib基础绘图函数示例

    Matplotlib库入门 Matplotlib基础绘图函数示例 pyplot基础图表函数概述 函数 说明 plt.plot(x,y,fmt, ...) 绘制一个坐标图 plt.boxplot(dat ...