Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error- No resource found that matches the given name (at 'MvxItemTemplate' with value '@layout/itemc')

I am using MvvmCross to create PCL.In my Android application,I have created a mvx.mvxListView which has ItemTemplate named itemc.axml. The file itemc.axml is created in Layout folder but still it gives this error. Error- No resource found that matches the given name (at 'MvxItemTemplate' with value '@layout/itemc')

Why?

My FirstView.axml file is as follows

          <?xml version="1.0" encoding="utf-8"?>
           <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    xmlns:local="http://schemas.android.com/apk/res/constD.Droid"
                    android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent">
                    <Button
                             android:text="Show Constituencies"
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             android:id="@+id/button1" />
                    <Mvx.MvxListView
                             android:layout_width="fill_parent"
                             android:layout_height="fill_parent"
                             local:MvxBind="ItemsSource Result"
                             local:MvxItemTemplate="@layout/itemc" />
             </LinearLayout>

and my itemc.axml file is as follows.

     <?xml version="1.0" encoding="utf-8"?>
     <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:local="http://schemas.android.com/apk/res-auto"
             android:orientation="vertical"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent">
             <TextView
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"
                      android:textSize="40dp"
                      local:MvxBind="Text name" />
    </LinearLayout>

Why it is so?

like image 557
Suraj Avatar asked Dec 15 '22 03:12

Suraj


1 Answers

Try Renaming the file itemc.axml to Itemc.axml, see if that works

like image 133
Bob The Janitor Avatar answered May 20 '23 19:05

Bob The Janitor