我开始与Android,我想要添加一个边框到单元格描述in this answer。所以,我创建了cell_background.xml文件,Eclipse的创造res\drawable
,并包含NotFoundException当寻找可绘制资源
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape= "rectangle" >
<solid android:color="#000"/>
<stroke android:width="1dp" android:color="#ff9"/>
</shape>
看了有与绘制文件夹的几个问题,我复制它逐字到res\drawable-*dpi
目录
现在,在下面的行
Drawable drawable = Resources.getSystem().getDrawable(R.drawable.cell_background);
我的应用程序崩溃与此异常
12-16 14:26:28.624: E/AndroidRuntime(533): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f020000
项目和模拟器都设置为v3.0
任何想法?我已经清理并重建了该项目,但仍然崩溃。
尝试清洗项目 – 2011-12-16 14:39:33
已经完成,但由于 – SJuan76 2011-12-16 14:40:40