Android xml形状渐变不';我的小部件上没有显示

Android xml形状渐变不';我的小部件上没有显示,android,widget,gradient,remoteview,Android,Widget,Gradient,Remoteview,我想给我的小部件一个渐变背景。为此,我使用以下xml作为渐变: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="@color/general_lis

我想给我的小部件一个渐变背景。为此,我使用以下xml作为渐变:

<?xml version="1.0" encoding="utf-8"?>
<shape 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:shape="rectangle">
    <gradient 
        android:startColor="@color/general_listrow_background_start"
        android:endColor="@color/general_listrow_background_end"
        android:angle="270"/>    
</shape>

并将此添加到我的布局中:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/widget_main_layout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_margin="@dimen/widget_margin"
    android:padding="@dimen/widget_padding"
    android:orientation="vertical"
    android:background="@drawable/background_gradient">
    ....
</LinearLayout>

....

如果我在我的应用程序中使用这个布局,它就会显示出来,但在我的小部件上,我只能看到一个白色的屏幕。我错过什么了吗?难道不可能在RemoteView中提供xml渐变吗?

可能只是清理并构建项目,然后检查它是否应该工作:)

可能只是清理并构建项目,然后检查它是否应该工作:)嗯,你是对的。老日食“我做我想做的事,直到你清理我”。把它作为答案贴出来,我会accept@Choletski您得到了什么错误或什么输出?你期望什么?