I am getting compilation error in axml where I have referenced the item before declaring it.
As far as I know, Android doesn't have any such constraints. Moreover if I copy paste the same layout in Android studio it works fine.
Does anyone know a workaround of this issue in Xamarin.Android
The error is:
error APT0000: No resource found that matches the given name (at 'layout_below' with value '@id/textView1').
Here is a simplified version of layout to generate the error:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="25px"
android:minHeight="25px">
<Button
android:id="@+id/button1"
android:text="Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@id/textView1" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="Hello World" />
</RelativeLayout>