android gradle 编译aapt finished with non- zero exit value 1错误解决

Life is short , play more!
本文来自lihao's Blog,转载请注明。

./gradlew build 时报错

错误类似如下:

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:  Process ‘command ‘C:\Users\Vishnu Ruhela\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe” finished with non- zero exit value 1

1. 获取更详细的错误日志

./gradlew assembleDebug --info
发现我们的错误是: aapt error : libstdc++.so.6 cannot open shared object file

20140321/sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

2.   redhat 系统安装 libstdc++

sudo yum install libstdc++.i686 -y
sudo yum install libstdc++.x86_64 -y

安装后重新build,问题解决。


发表评论

电子邮件地址不会被公开。 必填项已用*标注