我有一个Xamarin.Forms解决方案,它在每个项目(Android,iOS和Windows 8.1)中包含一个名为Plugin.SecureStorage的库:https: //github.com/sameerkapps/SecureStorage 我在每个项目中通过NuGET安装它.
在iOS和Windows 8.1中一切正常,问题出在Android上.Android中的项目构建正确,但在启动时我得到这个:
[...]
Loaded assembly: MonoDroidConstructors [External]
09-27 18:14:49.880 D/Mono (30329): Assembly Ref addref AppConsume.Droid[0xb8cb0608] -> mscorlib[0xb8c64bc0]: 23
09-27 18:14:49.890 D/Mono (30329): Assembly Ref addref Xamarin.Forms.Core[0xb8cbca58] -> System.Collections[0xb8cc5980]: 3
09-27 18:14:49.900 D/Mono (30329): Assembly Ref addref Xamarin.Forms.Core[0xb8cbca58] -> System.Threading[0xb8cd4948]: 3
09-27 18:14:49.930 D/Mono (30329): Assembly Ref addref AppConsume.Droid[0xb8cb0608] -> Plugin.SecureStorage[0xb8cb43f8]: 2
Unhandled Exception:
System.TypeLoadException: Could not resolve type with token 01000019
Run Code Online (Sandbox Code Playgroud)
它的意思是什么?对我来说有点神秘.我该如何解决这个问题?
当然,作为一项要求,我添加了这一行......
SecureStorageImplementation.StoragePassword = "mypass";
Run Code Online (Sandbox Code Playgroud)
在Android项目的MainActivity.cs中......
using System;
using Android.App;
using Android.Content.PM;
using …Run Code Online (Sandbox Code Playgroud) 我有一个项目,我试图在Android中运行,它给了我这个错误.我只是乱了2分钟尝试以下方法:
someEntry.BackgroundColor = Color.Green;
Run Code Online (Sandbox Code Playgroud)
在此之后,我的应用程序在之前工作时崩溃了.
编辑:我知道这与它无关,但我很想知道发生了什么,这就是为什么我把它放在解释中.
之后我撤消了所有的修改.自从我这样做以后,这个错误在启动时发生:
未处理的异常:
System.TypeLoadException:无法使用标记0100004c解析类型
所以我想我的问题主要是,这个标记"0100004c"是什么意思,有什么方法可以修复它吗?
提前致谢.