Ubuntu下gradle运行卡住,出现Exception in thread "png-cruncher_xxx"错误的解决办法

前端之家收集整理的这篇文章主要介绍了Ubuntu下gradle运行卡住,出现Exception in thread "png-cruncher_xxx"错误的解决办法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

ubuntu下用GRADLE 编译android应用,一直卡住,看了一下错误日志:

Thread(png-cruncher_14) has a null payload
java.io.IOException: Cannot run program "/opt/sdk1/build-tools/23.0.1/aapt": error=2,No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at com.android.builder.png.AaptProcess$Builder.start(AaptProcess.java:163)
	at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:106)
	at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: error=2,No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 4 more

原因是,我是64位的系统,系统缺少32位的相关依赖库。

打开终端依次运行以下命令,重新编译就可以了


[html] view plain copy
  1. sudodpkg--add-architecturei386
  2. sudoapt-getupdate
  3. sudoapt-getinstalllibncurses5:i386libstdc++6:i386zlib1g:i386
原文链接:https://www.f2er.com/ubuntu/353614.html

猜你在找的Ubuntu相关文章