【发布时间】:2012-03-05 22:02:47
【问题描述】:
我不断收到 FileNotFound 异常,坦率地说,这没有任何意义。这是我的文件:
custom.xml
<item android:drawable="@drawable/easymode"></item>
main.xml
<Button android:id="@+id/guess"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
android:layout_marginBottom="20dp"
android:onClick="myClickHandler"
android:background="@drawable/custom"></Button>
我尝试将背景标签移到其他标签上方,看看是否会导致它失败,但没有成功。我已将 custom.xml 文件移至可绘制文件夹,并移至 ldpi 和 mdpi 文件夹,但它一直给我同样的错误。为什么它很清楚地找不到我的custom.xml? R.java 也列出了它,所以我知道它已经成功生成了指向它的链接...帮助!
【问题讨论】:
-
你能发布你的整个custom.xml吗?我猜您的 xml 文件之一未编译并导致 R 文件无法正确构建
标签: android xml drawable filenotfoundexception