Android failed to execute aapt 错误 buildToolsVersion 23.0.1

296 阅读1分钟

最近需要升级一个较老Android项目,一直编译失败,

failed to execute aapt,

通过run-withstack发现,会报如下错误:

error=86, Bad CPU type in executable

查了很多尝试,最后才发现跟Mac系统有关。

原因是最新版本的macOS Catalina(10.15.5)已经不支持32位的应用了,只能运行64位的应用。

解决方法:升级工程的buildToolsVersion,本例中将23.0.1 升级成25.0.3。

相关链接:blog.shijiusui.com/archives/23…