R.java no such file or dictionary

Hi There,

 

After long time research, finally i got the resolution of this boring error. As you guys know, when you try to clean an android project by eclipse, this error occur sometimes. It's really a boring one since i as a android developer, it made me lost my hair. Anyway, i got the resolution by stackoverflow, thanks for them.

 

 Now i paste the answer here, hope to help any other developer as me.  You guys can transhipping this article, but please leave the original link. Thanks advanced.

 

We have finally tracked the last problem regarding this bug.

The "clean" action used to always delete the "gen" folder which was wrong. This was fixed in ADT 8 or 9, I can't remember.

However, if the "gen" folder is marked as derived it still gets deleted which leads to the error.

When the "New Project Wizard" is run, the gen folder is created normally, without the "derived" flag, so this is fine.

The following scenario however is broken:

  • delete manually gen, or
  • check in the source code in a repository (git/svn/...) and don't put the "gen" folder in there, then do a check out on another computer.

  • This leads to ADT recreating automatically the "gen" folder during build, this time enabling the "derived" flag, which will trigger the wrong behavior on "clean".

The temporary solution is to:

  • right click "gen"
  • choose "Properties"
  • uncheck "Derived"

as long as the "gen" folder doesn't get deleted you'll be able to clean your project without side effect.

I just checked in a fix to: - never mark the folder as "derived" - during clean, first remove the "derived" flag from "gen" so that it doesn't get deleted in the case of older projects. Patch is visible at:https://review.source.android.com/#change,22410 

 

 

Thanks,

 

Henry Hu 

转载于:https://www.cnblogs.com/henryhu/archive/2011/05/23/2054159.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值