3つのフラグメントを構成しようとしています:残りのすべてのスペースを取ることになる中間に1つ。指定された名前と一致するリソースが見つかりません(値 '@ id/right_item_menu_fragment'を持つ 'layout_toRightOf')
「layout_toRightOf」の値が「0」の特定の名前と一致するリソースが見つかりませんでしたが、私は解決策を探して、私がオンラインで見つけた提案に従いました。 @ id/right_item_menu_fragment ')。
レイアウトid = 'right_item_menu_fragment'の後にRelativeLayout id = 'canvas_fragment'を移動すると、インストールは成功します(上述のエラーはありません)。ただし、 'canvas_fragment'は画面に表示されません。
私はこのエラーを検索しましたが、それは起こり得るさまざまな理由がありますが、私の状況には該当しません。 Eclipseを使用すると多くの人にこのエラーが発生しますが、Androidスタジオを使用しています。
私が間違っていることを誰かが指摘できれば、大いに助けになるでしょう。
は、ここに私のレイアウトです:私はこの前に実行した
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/canvas_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/left_item_menu_fragment"
android:layout_width="@dimen/item_menu_width"
android:layout_height="match_parent"
android:layout_alignParentLeft = "true"
android:background="#cccccc">
</RelativeLayout>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/canvas_fragment"
android:orientation="vertical"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_toLeftOf = "@+id/left_item_menu_fragment"
android:layout_toRightOf = "@id/right_item_menu_fragment"
android:background="#000000" >
</RelativeLayout>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/right_item_menu_fragment"
android:layout_width="@dimen/item_menu_width"
android:layout_height="match_parent"
android:layout_alignParentRight = "true"
android:background="#cccccc">
</RelativeLayout>
</RelativeLayout>
'id'の前に' + 'を追加します。つまり、 '' @ + id/right_item_menu_fragment ''です。その順序であなたのレイアウトでは、そのIDはまだ生成されていません。これは '+'のものです。 –