I am absolutely new to Java and Eclipse. I have two layout-files under /res/layout:
activity_main.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<include layout="@layout/layoutTst" />
</LinearLayout>
layout_test.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/layoutTst"
android:orientation="vertical" >
</LinearLayout>
When I try to compile at the “include” – part I get this message:
Description Resource Path Location Type error: Error: No resource
found that matches the given name (at 'layout' with value
'@layout/layoutTst'). activity_main.xml /YouSherlock/res/layout line
6 Android AAPT Problem
So what is wrong?
You need to include the layout filename (layout_test.xml), not the ID of the root in that layout.