[英]Android gradle build failed : aapt error 137
Randomly, while trying to build my android applications, I have this message during the mergeResources : 随机地,在尝试构建我的android应用程序时,我在mergeResources期间有这条消息:
Execution failed for task ':ImmoStruct:mergeReleaseResources'. 任务':ImmoStruct:mergeReleaseResources'的执行失败。
Failed to run command:
无法运行命令:
/home/android/adt-bundle/sdk/build-tools/21.1.2/aapt s -i /home/android/queue/294c2840260c2d59c396a7e08ac3c32ba045cb28/ImmoStruct/src/main/res/drawable-mdpi/ic_find_previous_holo_light.png -o /home/android/queue/294c2840260c2d59c396a7e08ac3c32ba045cb28/ImmoStruct/build/res/all/release/drawable-mdpi/ic_find_previous_holo_light.png Error Code: 137/home/android/adt-bundle/sdk/build-tools/21.1.2/aapt s -i /home/android/queue/294c2840260c2d59c396a7e08ac3c32ba045cb28/ImmoStruct/src/main/res/drawable-mdpi/ic_find_previous_holo_light.png -o / home / android / queue / 294c2840260c2d59c396a7e08ac3c32ba045cb28 / ImmoStruct / build / res / all / release / drawable -mdpi / ic_find_previous_holo_light.png错误代码:137
Sometimes it works fine, sometimes it doesn't... 有时它工作正常,有时它不...
The concerned files are not always the same : ic_find_previous_holo_light.png common_signin_btn_icon_disabled_focus_light.9.png abs__ab_bottom_solid_light_holo.9.png 相关文件并不总是相同:ic_find_previous_holo_light.png common_signin_btn_icon_disabled_focus_light.9.png abs__ab_bottom_solid_light_holo.9.png
I tried to change the build version, but the problem remains. 我试图改变构建版本,但问题仍然存在。
Any idea on the cause, workaround ? 关于原因的任何想法,解决方法?
Thanks for your help 谢谢你的帮助
I saw this problem too and believe it is related to the gradle deamon. 我也看到了这个问题,并认为这与gradle deamon有关。
run $./gradlew --stop 运行$。/ gradlew --stop
prior to your task. 在你的任务之前。 it did the trick for me.
它为我做了伎俩。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.