Java.Lang.NoClassDefFoundError: '失败的解析:Landroidx/arch/core/executor/ArchTaskExecutor;'

问题描述

我在导入 newtonsoft、json 库时正在编程。突然,当我执行我的应用程序时会显示这个 mesaje。以前从来没有出现过。

enter image description here

我回到了项目的最后一个成功版本,同时我删除了新库。但是当我执行它时,仍然是消息。我还尝试执行一个新的“hello world”Xamarin.Android 应用程序,但它说的是相同的。我无法部署 android 模拟器。看起来我的所有 Visual Studio 和模拟器都崩溃了。

这是错误代码

enter image description here

我能做什么? Desintall 所有的视觉工作室并重新安装它?有没有办法只重新安装 Android 管理设备?

解决方法

在您的 Hello World 中,如果使用 Xamarin.AndroidX.App.Compat 1.2.0.7,您还需要 Xamarin.AndroidX.Arch.Core.Runtime 版本 2.1.0.8,所以我怀疑您的主目录中也需要它项目也是。见https://github.com/xamarin/AndroidX/issues/278

我使用的是 VS 16.10.0 Prev 1.0,所以如果使用早期版本的 VS 可能会有所不同