I got this error when I clicked build apk in Android Studio.
当我在Android Studio中点击构建apk时出现此错误。
Error:Execution failed for task ':app:compileDebugNdk'.
错误:任务':app:compileDebugNdk'的执行失败。
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Webspace\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd'' finished with non-zero exit value 1
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'C:\ Users \ Webspace \ AppData \ Local \ Android \ Sdk \ ndk-bundle \ ndk-build.cmd ''以非零退出值1完成
Can't find a solution for this. I am a newbie in android development. Can anyone help me to solve this error.
无法找到解决方案。我是android开发的新手。任何人都可以帮我解决这个错误。
1 个解决方案
#1
0
Try to make a clean project. If it does not work, try restarting the Android Studio.
尝试制作一个干净的项目。如果它不起作用,请尝试重新启动Android Studio。
If these steps do not work, try changing the "buildToolsVersion" in build.gradle file to "23.0.2" or higher.
如果这些步骤不起作用,请尝试将build.gradle文件中的“buildToolsVersion”更改为“23.0.2”或更高版本。
You can try also to add this, in your build.gradle:
您也可以尝试在build.gradle中添加它:
dexOptions {
incremental = true;
preDexLibraries = false
javaMaxHeapSize "4g"
}
PS. Ensure that the path to your NDK is correct in "local.properties" folder!
PS。确保“local.properties”文件夹中NDK的路径正确!
#1
0
Try to make a clean project. If it does not work, try restarting the Android Studio.
尝试制作一个干净的项目。如果它不起作用,请尝试重新启动Android Studio。
If these steps do not work, try changing the "buildToolsVersion" in build.gradle file to "23.0.2" or higher.
如果这些步骤不起作用,请尝试将build.gradle文件中的“buildToolsVersion”更改为“23.0.2”或更高版本。
You can try also to add this, in your build.gradle:
您也可以尝试在build.gradle中添加它:
dexOptions {
incremental = true;
preDexLibraries = false
javaMaxHeapSize "4g"
}
PS. Ensure that the path to your NDK is correct in "local.properties" folder!
PS。确保“local.properties”文件夹中NDK的路径正确!