[英]android eclipse resource image not found in drawable
错误:找不到与给定名称匹配的资源(在“背景”处,值为“ @ drawable / mydroidbg.png”)。
这是我图片的位置:C:\\ Users \\ Rogeross \\ Documents \\ ECLIPSE \\ MyFirstApp \\ res \\ drawable-hdpi \\ mydroidbg.png
这是main.xml代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/mydroidbg.png" //error here
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="TOTO ANDROID"
android:gravity="center"
/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="PRESS ME!!"
android:textSize="19dp"
android:textStyle="bold"
/>
</LinearLayout>
我已经清理过,刷新了我的项目,但是它仍然看不到我的图像文件...请帮助...。
不要提及文件扩展名。 采用:
android:background="@drawable/mydroidbg"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.