资源文件调试

问题

修改公司陈年老项目的时候编译一直失败,报 aapt 的错误,aapt 是 Android 资源文件打包工具。应该是资源文件有问题,但是编译器不报详细的错误。

解决方法

在终端输入命令行 gradlew processDebugResources --debug进行资源文件的调试,然后发现了E:\PayxDriver\umeng_sdk\build\intermediates\res\merged\release\layout\umeng_socialize_oauth_dialog.xml:41: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/ umeng_socialize_btn_bg').找到对应的资源文件,增加缺失的 drawable 文件,再次编译运行,大功告成!

你可能感兴趣的:(资源文件调试)