У меня есть приложение, написанное на Mono Android, которое имеет форму и отображает данные в списке. Приложение работает нормально. Но теперь я пытаюсь добавить еще одно поле в макет:Android.Content.Res.Resources + NotFoundException
<TextView
android:id="@+id/textDeliveryNo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="12345"
android:textStyle="bold"
android:textColor="@color/title"
android:textSize="20px"
/>
Я изменил деятельность acordingly, чтобы установить это поле со значением:
//Get our object for this position
var item = items[position];
var view = (convertView ??
context.LayoutInflater.Inflate(
Resource.Layout.DeliveriesListItem, parent,
false)) as LinearLayout;
//Find references to each subview in the list item's view
var imageItem = view.FindViewById(Resource.Id.imageItem) as ImageView;
var textDeliveryNo = view.FindViewById(Resource.Id.textDeliveryNo) as TextView;
var textDeliveryName = view.FindViewById(Resource.Id.textDeliveryName) as TextView;
var textDeliveryAddress = view.FindViewById(Resource.Id.textDeliveryAddress) as TextView;
var textDeliveryCityAndZip = view.FindViewById(Resource.Id.textDeliveryCityAndZip) as TextView;
//Assign this item's values to the various subviews
imageItem.SetImageResource(item.Image);
ERROR LINE> textDeliveryNo.SetText(item.DeliveryNo, TextView.BufferType.Normal); textDeliveryName.SetText(item.LocationName, TextView.BufferType.Normal); textDeliveryAddress.SetText(item.Address, TextView.BufferType.Normal); textDeliveryCityAndZip.SetText(item.City + ", " + item.PostalCode, TextView.BufferType.Normal);
отладчик останавливается на ОШИБКИ LINE с ошибкой: Android.Content.Res.Resources + NotFoundException:
Я попытался очистить, перестроить проект ... перезапустить VS 20 10 но ничего. Если я прокомментирую эту строку, она будет компилироваться, но она покажет «12345» или что-то еще, что я наложу на свойство android: text.
Я бы оценил любую помощь, которую я могу получить. Большое спасибо!