美文网首页
【我的Android进阶之旅】解决编译出现错误:Error: I

【我的Android进阶之旅】解决编译出现错误:Error: I

作者: 欧阳鹏 | 来源:发表于2018-12-06 19:45 被阅读17次

一、问题描述

晚上在Android Studio上,切换分支之后,重新编译运行的时候,报错了,错误信息如下所示:


在这里插入图片描述

错误信息文本:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':p_imphone:packageDebugResources'.
> D:\GitLab Source\XTCWatch_TalentAccount\XTCWatch\p_imphone\src\main\res\values\strings.xml: Error: In DataSet 'main', no data file for changedFile. This is an internal error in the incremental builds code; to work around it, try doing a full clean build.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 27s
74 actionable tasks: 30 executed, 44 up-to-date

二、解决错误

如上所示,提示我们要想编译成功,得先来一遍完全的clean,因为切换分支之前,有其他分支编译的产物影响了切换分支之后的编译。

Error: In DataSet 'main', no data file for changedFile. This is an internal error in the incremental builds code; to work around it, try doing a full clean build.

  • 执行 gradlew clean 命令


    在这里插入图片描述
  • 重新编译
    clean成功之后,再次编译的话就成功了,如下所示:

在这里插入图片描述
image

作者:欧阳鹏 欢迎转载,与人分享是进步的源泉!
转载请保留原文地址:https://blog.csdn.net/ouyang_peng/article/details/83626004
如果本文对您有所帮助,欢迎您扫码下图所示的支付宝和微信支付二维码对本文进行打赏。

image

相关文章

网友评论

      本文标题:【我的Android进阶之旅】解决编译出现错误:Error: I

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