簡體   English   中英

在drawable中找不到android eclipse資源圖片

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM