Android异常-Process 'command 'D:xxx\build-tools\xxx\aapt.exe'' finished with non-zero exit 1

时间:2021-01-12 23:02:59

编译出错信息:

Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Android\sdk\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1


出错的原因:

一旦出现"xxxx finished with non-zero exit value 1",基本都是说什么文件或者依赖重复了,还有gradle的配置出错

解决方法:

 先clean一下,去除一下缓存,然后还是报错的话,就检查一下v4,v7包是否重复.还有个情况是配置的版本不匹配,例如我的complieSdkVersion = 22,导入的v4是23的,这种情况下gradle文件也会报红色的错误,比较好发现.