Error:Execution failed for task ':library:compileReleaseNdk'解决方案

标签: jni ndk GPUImage
11人阅读 评论(0) 收藏 举报

自己在研究GPUImage滤镜效果时遇到的坑,记录下:

1、首先下载GPUImage相关的源码及demo,导入android studio报如下错误:

Error:Execution failed for task ':library: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.

解决办法:在项目的gradle.properties文件中加入这句

android.useDeprecatedNdk=true


2、再次编译,如果还有问题:

解决方法:在你导入的包含jni的库的build.gradle文件中加入这句

sourceSets.main {
    jni.srcDirs = []
}

注意是在android{  ...  }之间加即...的地方加,问题就可以解决了,自己踩过的坑,希望可以帮到你

查看评论

Error:Execution failed for task ':app:compileDebugNdk'.> Error: NDK integrat

将一个eclipse项目导入到Android studio中出现了Error:Execution failed for task ':app:compileDebugNdk'.> Error: NDK...
  • zhongruichun
  • zhongruichun
  • 2016-06-06 19:23:23
  • 848

android studio NDK配置BUG问题

切换到studio后不久,项目集成了一个NDK的model,结果作为唯一window环境下的android工程师发现鸭梨山大,折腾了3个小时都没搞定. 错误如下所示: make.exe: *** ...
  • somatezyc
  • somatezyc
  • 2015-04-04 15:10:04
  • 3913

React Native编译错误:ReactAndroid:buildReactNdkLib FAILED

错误输出入如下:[armeabi-v7a] Compile++ : reactnativejni
  • wyk86485481
  • wyk86485481
  • 2016-12-18 10:14:21
  • 1460

Error:Execution failed for task ':app:compileDebugNdk'. > NDK not configured.

报错信息: Error:Execution failed for task ':app:compileDebugNdk'. > NDK not configured. Download the ND...
  • changlei_shennan
  • changlei_shennan
  • 2017-05-12 10:47:22
  • 704

Android Studio运行或Rebuild的时候报Error:Execution failed for task ':app:compileDebugNdk'.的解决办法

Error:Execution failed for task ':app:compileDebugNdk'. > Error: NDK integration is deprecated in th...
  • qq_15003505
  • qq_15003505
  • 2016-04-22 21:34:44
  • 3954

Error:Execution failed for task ':app:compileDebugNdk' 解决方法

近期在看webrtc源码的时候出现了Error:Execution failed for task ':app:compileDebugNdk'.的问题,具体描述如下: Error:Executio...
  • sinat_25263097
  • sinat_25263097
  • 2016-01-08 10:52:08
  • 19875

Android Studio Error:Execution failed for task ':library:compileReleaseJava'

Android Studio 运行新项目运行不了,出现:Error:Execution failed for task ':library:compileReleaseJava'. > Cannot...
  • My_GTH
  • My_GTH
  • 2017-05-25 22:12:49
  • 1040

Android studio填坑:Execution failed for task ':app:compileDebugNdk'.异常的处理

Execution failed for task ':app:compileDebugNdk'. 异常的解决
  • Mr_Feng_
  • Mr_Feng_
  • 2016-11-07 12:01:36
  • 4483

[Android Studio][NDK]Execution failed for task ':app:compileDebugNdk'. Error Code:2

Execution failed for task ':app:compileDebugNdk'.> com.android.ide.common.internal.LoggedErrorExcept...
  • sodino
  • sodino
  • 2014-12-12 16:06:44
  • 48297

解决导入项目工程“Execution failed for task ':lib:compileReleaseJava'的问题

问题报错: Error:Execution failed for task ':lib:compileReleaseJava'. > Cannot find System Java Compiler....
  • wangyongyao1989
  • wangyongyao1989
  • 2017-07-26 17:50:09
  • 717
    个人资料
    等级:
    访问量: 306
    积分: 86
    排名: 151万+
    文章分类
    文章存档
    最新评论