【问题标题】:Resource id 0x1010081 is not of type STYLE (instead attr)资源 id 0x1010081 不是 STYLE 类型(而是 attr)
【发布时间】:2015-09-17 15:01:39
【问题描述】:

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

我试图改变

 android:spinnerMode="dropdown"

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

但它不起作用

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

【问题讨论】:

    标签: android


    【解决方案1】:

    对我来说,这段代码正在运行style="@android:style/Theme",例如:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-01-23
      • 1970-01-01
      • 2015-04-02
      • 2022-01-25
      • 2015-12-08
      • 2020-05-02
      • 1970-01-01
      • 2012-06-08
      相关资源
      最近更新 更多