设置背景颜色时无法将@ color/Blue转换为drawable

Huk*_*ABA 5 android

RES /布局/ activity_main.xml中

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:background="@color/Blue">

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
     />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

同时,res/values/colors.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="Blue">#0000FF</color>
</resources>
Run Code Online (Sandbox Code Playgroud)

正如你所看到的,颜色确实以#开头

代码完全如您所见.

Huk*_*ABA 11

我必须转到文件 - >无效缓存/重启.

让我感到惊讶的是,这个bug仍然没有在Android Studio中得到修复,在SO上搜索它似乎以不同的方式困扰着其他人.