Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

System.TypeLoadException Could not load type CategoriesActivity

$
0
0

I am very new in Xamarin Application Development.

I have written an Activity class with following definition

[Activity(Label = "Courses", MainLauncher = true, Icon = "@drawable/icon")]
public class CategoriesActivity : ListActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);

// Create your application here

string[] categoryTitles = {"Category 1", "Category 2", "Category 3" };

ListAdapter =
new ArrayAdapter(this, global::Android.Resource.Layout.SimpleListItem1,
categoryTitles);
}
}

The purpose of this activity class is to showing Category 1, Category 2, and Category 3 as List Items.

But when I run the application it returns me following exception:

01-23 14:27:19.157 E/MonoDroid( 2137): Could not load type 'Courses.Android.CategoriesActivity, Courses.Android, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Skipping JNI registration of type 'md5ba6caf9a9061d0cbb25c0daaef535be4/CategoriesActivity'.
An unhandled exception occured.

01-23 14:27:20.371 I/art ( 2137): Thread[2,tid=2143,WaitingInMainSignalCatcherLoop,Thread*=0xaf478400,peer=0x12c00080,"Signal Catcher"]: reacting to signal 3
01-23 14:27:21.224 I/art ( 2137): Wrote stack traces to '/data/anr/traces.txt'
01-23 14:27:23.305 I/MonoDroid( 2137): UNHANDLED EXCEPTION:
01-23 14:27:23.526 I/MonoDroid( 2137): System.TypeLoadException: Could not load type 'Courses.Android.CategoriesActivity, Courses.Android, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' from assembly ''.
01-23 14:27:23.526 I/MonoDroid( 2137): at (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)
01-23 14:27:23.527 I/MonoDroid( 2137): at System.Type.GetType (System.String typeName, Boolean throwOnError) [0x00011] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/mcs/class/corlib/ReferenceSources/Type.cs:57
01-23 14:27:23.527 I/MonoDroid( 2137): at Java.Interop.TypeManager.n_Activate (IntPtr jnienv, IntPtr jclass, IntPtr typename_ptr, IntPtr signature_ptr, IntPtr jobject, IntPtr parameters_ptr) [0x0007b] in /Users/builder/data/lanes/2098/3efa14c4/source/monodroid/src/Mono.Android/src/Java.Interop/TypeManager.cs:145
01-23 14:27:23.527 I/MonoDroid( 2137): at (wrapper dynamic-method) System.Object:90d2a13e-584b-4a05-a439-c9d6ba401669 (intptr,intptr,intptr,intptr,intptr,intptr)
01-23 14:27:23.644 W/art ( 2137): JNI RegisterNativeMethods: attempt to register 0 native methods for md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable
An unhandled exception occured.

01-23 14:27:24.452 E/mono ( 2137):
01-23 14:27:24.452 E/mono ( 2137): Unhandled Exception:
01-23 14:27:24.452 E/mono ( 2137): System.TypeLoadException: Could not load type 'Courses.Android.CategoriesActivity, Courses.Android, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' from assembly ''.
01-23 14:27:24.452 E/mono ( 2137): at (wrapper dynamic-method) System.Object:90d2a13e-584b-4a05-a439-c9d6ba401669 (intptr,intptr,intptr,intptr,intptr,intptr)
01-23 14:27:24.452 E/mono ( 2137): at (wrapper native-to-managed) System.Object:90d2a13e-584b-4a05-a439-c9d6ba401669 (intptr,intptr,intptr,intptr,intptr,intptr)
01-23 14:27:24.453 E/mono-rt ( 2137): [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'Courses.Android.CategoriesActivity, Courses.Android, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' from assembly ''.
01-23 14:27:24.453 E/mono-rt ( 2137): at (wrapper dynamic-method) System.Object:90d2a13e-584b-4a05-a439-c9d6ba401669 (intptr,intptr,intptr,intptr,intptr,intptr)
01-23 14:27:24.453 E/mono-rt ( 2137): at (wrapper native-to-managed) System.Object:90d2a13e-584b-4a05-a439-c9d6ba401669 (intptr,intptr,intptr,intptr,intptr,intptr)
referenceTable GDEF length=670 1
referenceTable GSUB length=7202 1
referenceTable GPOS length=24560 1


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>