'Could not resolve type with token 0100004b from typeref (expected class 'Windows.UI.Xaml.IDependencyObjectInternal' in assembly 'Uno.UI
**System.Reflection.TargetInvocationException:** 'Exception has been thrown by the target of an invocation.'
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Could not resolve type with token 0100004b from typeref (expected class 'Windows.UI.Xaml.IDependencyObjectInternal' in assembly 'Uno.UI, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null')
[mono-rt] at Uno.Material.GlobalStaticResources.get_mergedpages_c69cbc6d79c924ed978294ad194451a9_ResourceDictionary () [0x00000] in /_/src/library/Uno.Material/Uno.UI.SourceGenerators/Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator/mergedpages_c69cbc6d79c924ed978294ad194451a9.cs:5572
[mono-rt] at Uno.Material.GlobalStaticResources+<>c.<RegisterResourceDictionariesBySource>b__21_3 () [0x00000] in /_/src/library/Uno.Material/Uno.UI.SourceGenerators/Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator/GlobalStaticResources.cs:86
[mono-rt] at Uno.UI.ResourceResolver.RetrieveDictionaryForSource (System.String source, System.String currentAbsolutePath) [0x00033] in C:\a\1\s\src\Uno.UI\UI\Xaml\ResourceResolver.cs:395
[mono-rt] at Uno.UI.ResourceResolver.RetrieveDictionaryForSource (System.Uri source) [0x0000e] in C:\a\1\s\src\Uno.UI\UI\Xaml\ResourceResolver.cs:373
[mono-rt] at Windows.UI.Xaml.ResourceDictionary.set_Source (System.Uri value) [0x00008] in C:\a\1\s\src\Uno.UI\UI\Xaml\ResourceDictionary.cs:41
[mono-rt] at Uno.Material.MaterialResources..ctor () [0x00006] in /_/src/library/Uno.Material/MaterialResources.cs:20
[mono-rt] at PKWeb.App.InitializeComponent () [0x000c4] in D:\Code\PubcastX\PKWeb\PKWeb.Droid\obj\Debug\100\g\XamlCodeGenerator\App_b72683a29305e1829dde434ca5f6ae82.g.cs:79
[mono-rt] at PKWeb.App..ctor () [0x00013] in D:\Code\PubcastX\PKWeb\PKWeb.Droid\App.xaml.cs:41
[mono-rt] at PKWeb.Droid.Application+<>c.<.ctor>b__0_0 () [0x00000] in D:\Code\PubcastX\PKWeb\PKWeb.Droid\Main.cs:26
[mono-rt] at Windows.UI.Xaml.NativeApplication..ctor (Windows.UI.Xaml.NativeApplication+AppBuilder appBuilder, System.IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer) [0x00008] in C:\a\1\s\src\Uno.UI\UI\Xaml\NativeApplication.cs:36
[mono-rt] at PKWeb.Droid.Application..ctor (System.IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer) [0x00000] in D:\Code\PubcastX\PKWeb\PKWeb.Droid\Main.cs:26
[mono-rt] at (wrapper managed-to-native) System.Reflection.RuntimeConstructorInfo.InternalInvoke(System.Reflection.RuntimeConstructorInfo,object,object[],System.Exception&)
[mono-rt] at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:936
[mono-rt] --- End of inner exception stack trace ---
[mono-rt] at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.1(intptr,intptr)
[mono-rt] at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.1(intptr,intptr)
[libFrameRecord] unloaded from PKWeb.PKWeb
[RefBase] RefBase: Explicit destruction, weak count = 0 (in 0x723994a668)
[RefBase] #00 pc 00000000000ee07c /apex/com.android.runtime/lib64/bionic/libc.so (__cxa_finalize+148)
[RefBase] #01 pc 00000000000e942c /apex/com.android.runtime/lib64/bionic/libc.so (exit+24)
[RefBase] #02 pc 000000000015d32c /data/app/~~F0g8MSuR6MXJTfc9YqKfhw==/PKWeb.PKWeb-ENdkEe8ibO3BuFaUJ96fGA==/lib/arm64/libmonosgen-2.0.so (mono_invoke_unhandled_exception_hook+424)
This happens when I run my application on Android.
BTW.
I am new to Uno. And also new to Windows UWP,WinUI3,etc. I am very confused about assemblies referenced in Uno project.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
