Exception : AAPT2 error: check logs for details

前端 未结 23 1810
走了就别回头了
走了就别回头了 2020-11-27 14:00
Task :processDebugResources Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt
    at com.android.builder.core.AndroidBui         


        
23条回答
  •  萌比男神i
    2020-11-27 14:40

    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()
        }
    }
    

提交回复
热议问题