无法解析资源@ drawable/homebackground

Sim*_*Guy 6 android android-drawable

我使用Studio(64)和Java 7 在Android Lollipop(API 21)中创建了一个新项目.当我尝试在主要布局(相对布局)上添加背景时,我收到错误

在此输入图像描述

我的res文件夹结构是

在此输入图像描述

注意:我已在所有drawable*文件夹中放置了720x1280 img.

我的XML是

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity"
    android:padding="0dp"
    android:background="@drawable/homebackground">

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

我尝试使用PNG/JPG ..但我仍然得到同样的错误.谁能告诉我哪里出错了?


我提到了这些,但它们与我的问题无关或者没有解决我的问题

无法解析资源@ drawable/backround.png

RelativeLayout"无法解析资源......"Android

Android图片无法转换为drawable

Gun*_*Fan 9

如果您使用的是Android Studio,单击文件>无效缓存/重启应该可以解决问题.