【发布时间】:2011-12-16 23:24:38
【问题描述】:
我从 android 开始,我想为单元格添加边框,如 in this answer 所述。所以我创建了我的 cell_background.xml 文件,Eclipse 在res\drawable 中创建了该文件,其中包含
<?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
有什么想法吗?我已经清理并重建了项目,但它仍然崩溃。
【问题讨论】:
-
已经完成了,谢谢
标签: android