Back

android - 在使用layout_above 布局前,要保证参照物元素的id存在。(有上下的解析顺序)

发布时间: 2017-08-27 06:53:00

参考:https://stackoverflow.com/questions/45316718/no-resource-found-that-matches-the-given-name-error-even-though-the-names-matc

例如: (引用其他id 前,要确保该id存在)

<Button
android:id="@+id/to_do_btn"
...
/>

<ListView
...
android:layout_above="@id/to_do_btn"
>
</ListView>

Back