android eclipse clean 变异,Eclipse Android won't clean, won't refresh

I upgraded to Ubuntu 11.10, Eclipse 3.7.0, ADT 14.0.0.

When I replaced a picture resource in the /res/drawable-nodpi directory on the desktop, or a sound resource in the /res/raw directory, both the recompiled program and the Project Explorer use some previously cached version.

I tried the following, none of which worked:

right-click on filename in project explorer: Refresh

right-click on /drawable-nodpi dir in p.e.: Refresh

right-click on /res dir in p.e.: Refresh

right-click on Project in p.e.: Refresh

Project -> Clean...

Project -> check Build Automatically, Run->Run

The program recompiles new source code changes correctly, but reuses its own cached resources.

This is with an existing project that used to work under Ubuntu 10.

As a workaround, I renamed the file on disk; Deleted the file in the Eclipse Project Explorer; restored the name of the file on disk; and then dragged the file from the desktop into the /res/drawable-nodpi folder in the Project Explorer. Eclipse came back with a popup asking whether I wanted to Copy or Link the file into Eclipse. I chose Link. This finally got the new version of the resources imported.

Update: After the source code that used these images got modified elsewhere, it quit recompiling, saying R.drawable.mypicname no longer referred to anything. So the Linked resources don't appear to be reliable after all. The latest workaround is to manually Copy the file on the desktop and Paste it into the Eclipse ProjEx /res/drawable-nodpi directory. This recompiled without any source code change, and ran on the device.

Both Clean and Refresh not working correctly is quite unexpected behavior. Why is it doing this? What am I doing wrong? How can I set the Eclipse environment so that when I change the file on disk, it uses the current latest version? Or at least allows me to Refresh? Thanks.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值