2015-03-25 61 views
1

我看到一个我从未见过的Android错误,它阻止了我的一些布局文件在Android Studio中呈现。在图形布局编辑器中显示的错误是:“Resource id 0x1010081 is not of type STYLE (instead attr)”。我使用的是Android API 17资源ID 0x1010081不是STYLE类型(而是attr)

我试图从

android:spinnerMode="dropdown" 

改变

android:spinnerStyle="@android:style/Widget.Spinner.DropDown"

,但它不工作

Android layout error: "Resource id <res_id> is not of type STYLE (instead attr)"

+0

post screenshot – Sjd 2015-03-25 08:42:26

回答

0

对于我这个代码正在工作style="@android:style/Theme" f或例如:

<Spinner 

     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:id="@+id/spChooseName" 
     style="@android:style/Theme" 
/>