RelativeLayout's layout_above gives "No resource found" error

As I understand it, the first time an id is used in a layout xml, it needs to have a + sign in front of it.

From the Declaring Layout docs:

The plus-symbol (+) means that this is a new resource name that must be created and added to our resources (in the R.java file).

So, add a '+' to the first btn_4 reference in the ListView layout and you can remove the unnecessary '+' from the android:id attribute in the Button layout.


When you declare relative layouts, you have to use android:layout_above="@+id/layoutToBeAbove"

Otherwise, the system does not know what you're pointing at.

This declaration will point at the same resource.

Hope this helped!


Declare the ListView list_1 after declaring the Button btn_4 as it tries to reference it in android:layout_above="@id/btn_4".