Task :processDebugResources Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt
at com.android.builder.core.AndroidBui
For me, I got this error while working on some Udacity projects. I fixed it by adding the following code to the top-level build.gradle file.
allprojects {
String osName = System.getProperty("os.name").toLowerCase()
if (osName.contains("windows")) {
buildDir = "C:/tmp/${rootProject.name}/${project.name}"
}
repositories {
jcenter()
google()
}
}