执行失败的任务“:应用程序:compileDebugNdk”试图编译的Andr​​oid Studio项目与NDK源$ C ​​$ C时 [英] Execution failed for task ':app:compileDebugNdk' when trying to compile Android Studio project with NDK source code

查看:405
本文介绍了执行失败的任务“:应用程序:compileDebugNdk”试图编译的Andr​​oid Studio项目与NDK源$ C ​​$ C时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论我有多少教程其次,每次我试图让含C源文件gradle这个项目输出错误:

 错误:执行失败的任务:应用程序:compileDebugNdk。


  

com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:过程'命令'C:\\用户\\ svprdga \\下载\\ Android的NDK-r10d_x86 \\ NDK-build.cmd 非零退出值完成2


例如,我下载下面的教程,这也引发了同样的错误:

https://github.com/mpospelov/android-studio-ndk-你好世界

我已经看到了下面的问题,但我不完全明白我应该做的事:

<一个href=\"http://stackoverflow.com/questions/27453085/execution-failed-for-task-appcompiledebugndk-failed-to-run-this-command-ndk\">execution失败的任务:应用程序:compileDebugNdk无法运行此命令NDK-build.cmd
<一href=\"http://stackoverflow.com/questions/25052564/cant-build-project-with-android-ndk-and-ndroid-studio\">Can't建立项目与Android的NDK和ndroid工作室

任何帮助吗?


解决方案

也许这个答案将帮助: http://stackoverflow.com/a / 28810873
尝试空.c文件添加到您的JNI目录(如empty.c)。它的工作在我的情况 - 的Andr​​oid 1.1.0工作室与Android的NDK-r10d窗口-x86_64的

No matter how many tutorials I followed, every time I try to make a project containing C source files gradle outputs the error:

Error:Execution failed for task ':app:compileDebugNdk'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\svprdga\Downloads\android-ndk-r10d_x86\ndk-build.cmd'' finished with non-zero exit value 2

For example, I downloaded the following tutorial, which also throws the same error:

https://github.com/mpospelov/android-studio-ndk-hello-world

I have seen the following questions, but I not understand exactly what I am supposed to do:

execution failed for task ':app:compileDebugNdk' failed to run this command ndk-build.cmd Can't build project with android-ndk and ndroid Studio

Any help?

解决方案

Maybe this answer will help: http://stackoverflow.com/a/28810873 "Try to add empty .c file to your jni dir (like empty.c)". It worked in my case - Android Studio 1.1.0 with android-ndk-r10d-windows-x86_64

这篇关于执行失败的任务“:应用程序:compileDebugNdk”试图编译的Andr​​oid Studio项目与NDK源$ C ​​$ C时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆