Bu main.axml dosyasıdır.Resource.Id Xamarin içinde çalışmıyor
`<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:minWidth="25px"
android:minHeight="25px">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/myListView" />
</LinearLayout>`
Ve bu MainActivity.cs dosyasıdır:
protected override void OnCreate (Bundle paket) { base.OnCreate (demet);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
Glop = new List<string>();
Glop.Add("Tom");
Glop.Add("Dick");
Glop.Add("Harry");
Name = FindViewById<ListView>(Resource.Id.myListView);
}
Xamarin Android'de bir Liste Görünümü oluşturmaya çalışıyorum.
Android kimliğini myListView olarak değiştirdim ve ayrıca uygulamayı yeniden oluşturmaya çalıştım ancak hala bir hata olarak görünüyor. Ben şimdi ne yapmalıyım ?
Projenizi temizleyin ve yeniden oluşturun. Daha sonra yeni 'Id 'tanımınızı içermesi gereken Resources.designer.cs dosyasını yeniden oluşturmalıdır. –