android studio error:'D:\ProgramSoft\android-ndk-r10e\ndk-build.cmd'' finished with non-zero exit

最近在做项目时,调整了下工程在本地目录,编译时始终抛下面的异常,认真分析下面异常后,终于找到了原因:原来是工程结构的目录太深,android stuido 无法找到并创建so 文件build时的临时目录。只要将工程目录深度减少一 两级时就可以正常编译。

D:\ProgramSoft\workspace\edaijia2015\edaijia_driver_android\libraries\updater\src\main\jni\com_cundong_utils_PatchUtils.c:224:1: fatal error: opening dependency file D:\ProgramSoft\workspace\edaijia2015\edaijia_driver_android\libraries\updater\build\intermediates\ndk\release\obj/local/armeabi/objs/updater/D_\ProgramSoft\workspace\edaijia2015\edaijia_driver_android\libraries\updater\src\main\jni\com_cundong_utils_PatchUtils.o.d: No such file or directory

 }
 ^
compilation terminated.
make.exe: *** [D:\ProgramSoft\workspace\edaijia2015\edaijia_driver_android\libraries\updater\build\intermediates\ndk\release\obj/local/armeabi/objs/updater/D_\ProgramSoft\workspace\edaijia2015\edaijia_driver_android\libraries\updater\src\main\jni\com_cundong_utils_PatchUtils.o] Error 1
Error:Execution failed for task ':libraries:updater:compileReleaseNdk'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\ProgramSoft\android-ndk-r10e\ndk-build.cmd'' finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 15.393 secs
Information:1 error
Information:0 warnings

Information:See complete output in console



你可能感兴趣的:(android,ndk)