美文网首页
react-native 打包

react-native 打包

作者: Zihao_Wong | 来源:发表于2018-08-28 18:22 被阅读0次

今天给android项目打包时发现报错

:app:processReleaseResources FAILED
 
FAILURE: Build failed with an exception.
 
* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
 
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
 
BUILD FAILED

        并且发现打debug包不会报错,只有打release包才会报错,在网上搜索一下,大部分都是说SDK版本不匹配导致的,尝试将SDK版本调整到一致依然报错。
        后来经过排查,之前在执行react-native bundle...打包命令时,并不是所有分辨率都添加了图片资源文件,缺少图片导致aapt执行失败,手动将缺少的图片拷贝到对应的分辨率文件夹下,重新打包成功。

相关文章

网友评论

      本文标题:react-native 打包

      本文链接:https://www.haomeiwen.com/subject/hovqwftx.html