Error:org.gradle.process.internal.ExecException: Process ‘command ‘C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\26.0.2\aapt.exe” finished with non-zero exit value 1
Error:com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\26.0.2\aapt.exe with arguments {package -f –no-crunch -I C:\Users\Administrator\AppData\Local\Android\Sdk\platforms\android-26\android.jar -M \\?\E:\svndown\appname\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S E:\svndown\appname\app\build\intermediates\res\merged\debug -m -J \\?\E:\svndown\appname\app\build\generated\source\r\debug -F E:\svndown\appname\app\build\intermediates\res\debug\resources-debug.ap_ –custom-package com.Aeapp.phoneclear -0 apk –output-text-symbols \\?\E:\svndown\PhoneClear\app\build\intermediates\symbols\debug –no-version-vectors}
Error:No resource found that matches the given name (at ‘theme’ with value ‘@style/Theme.Design.NoActionBar’).
开发过程中碰到的坑,记录一下:
对于Error:org.gradle.process.internal.ExecException: Process ‘command ‘C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\26.0.2\aapt.exe” finished with non-zero exit value 1这个错误,网上有很多的解决办法。之所以解决办法很多,是因为很多原因会引起这个错误。例如:包引入导致v7 v4冲突,也有可能是因为资源文件错误。
有的错误提示明显,想我这只提示了No resource found that matches the given name (at ‘theme’ with value ‘@style/Theme.Design.NoActionBar’).
最后发现是第三方包用到了desin这个依赖,而我的项目中没有添加,导致一直通不过
最好加上就没问题了compile’com.android.support:design:26+’ 和compile’com.android.support:appcompat-v7:26+’
注意:这两个需要保持一直