简体   繁体   English

Android gradle build失败:aapt错误137

[英]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.

相关问题 Android gradle构建脚本在preDexDebug中返回错误137 - Android gradle build script returns error 137 in preDexDebug Gradle构建失败并出现错误:链接资源失败和AAPT2错误 - Gradle build fails with error: Failed linking resources and AAPT2 error Android-studio:gradle抛出app:mergeDebugResources失败错误。 AAPT2 aapt2-3.3.1-5013011-linux守护程序启动失败 - Android-studio: gradle throws app:mergeDebugResources failed error. AAPT2 aapt2-3.3.1-5013011-linux Daemon startup failed Android Gradle 构建错误“AAPT2 aapt2-4.1.0-6503028-windows 守护程序 #0:链接期间出现意外错误,试图停止守护程序。” - Android Gradle build error "AAPT2 aapt2-4.1.0-6503028-windows Daemon #0: Unexpected error during link, attempting to stop daemon." 一个Android项目的Gradle assembleDebug因aapt错误而失败 - Gradle assembleDebug of an Android project fails with aapt error Android:build.gradle错误(“无法解决”) - Android: build.gradle error (“Failed to resolve”) Flutter Android Studio Gradle 构建失败错误 - Flutter Android Studio Gradle Build Failed Error Android gradle 构建失败,出现错误没有匹配的变体 - Android gradle build failed with error No matching variant gradle 构建时 Android 打包失败,错误号为 3 - Android packaging failed when gradle build with error no 3 Android 资源链接失败(Gradle 构建错误) - Android resource linking failed (Gradle build error)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM