Eclipse的Andr​​oid将不干净,就不会刷新资源 [英] Eclipse Android won't clean, won't refresh resources

查看:111
本文介绍了Eclipse的Andr​​oid将不干净,就不会刷新资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我升级到Ubuntu 11.10时,Eclipse 3.7.0,ADT 14.0.0。

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

当我更换桌面上的/ RES /绘制-nodpi目录中的图片资源,或/ RES /原目录中的声音资源,无论是重新编译程序和项目资源管理器使用一些previously缓存版本

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

程序正确重新编译新源$ C ​​$ C的变化,但重新使用自己的缓存资源。 这与使用Ubuntu的10下工作,现有的项目。

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.

作为一种解决办法,我改名为磁盘上的文件;删除在Eclipse Project Explorer中的文件;恢复磁盘上的文件的名称;然后拖从桌面文件到Project Explorer中的/ RES /绘制-nodpi文件夹。日食带回来一个弹出窗口,询问是否我想复制或链接文件到Eclipse中。我选择了链接。这终于拿到了进口资源的新版本。

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.

更新:在源$ C ​​$ C,它利用这些图像得到了其他地方的修改,退出重新编译,说R.drawable.mypicname不再提及任何东西。因此,链接的资源不似乎毕竟可靠。最新的解决方法是手动将文件复制到桌面上,并将其粘贴到Eclipse中ProjEx / RES /绘制-nodpi目录。这个重新编译没有任何来源$ C ​​$ c修改,并运行在设备上。

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.

既干净又刷新无法正常工作是非常意外的行为。为什么这样做呢?我究竟做错了什么?如何设置Eclipse环境,这样当我改变磁盘上的文件,它采用了目前最新的版本?或者至少让我刷新?谢谢你。

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.

推荐答案

查找您的应用程序。也许有一个叫 RES /紧缩文件夹,所以搜索您可绘制,是不是清爽手动刷新。

Look for bin on your application. Probably there is a folder called res/crunch, so search for your drawable that isn't refreshing and refresh manually.

这篇关于Eclipse的Andr​​oid将不干净,就不会刷新资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆