【发布时间】:2018-05-16 04:27:37
【问题描述】:
布局工具属性在 Android Studio 3.1.2 中不起作用是否有任何可能的原因?它确实显示了工具,但找不到列表项、文本等!
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:text="Test Text"
>
</android.support.v7.widget.RecyclerView>
</FrameLayout>
请参阅here 了解错误。
【问题讨论】:
-
您可能已经这样做了,Gradle 同步有时可能会起作用?
-
请详细说明
-
tools:text, tools:listitem etc 给了我错误并且没有出现在基本代码完成中(ctrl + space)
标签: android android-layout android-studio layout android-recyclerview