Java.Lang.NoClassDefFoundError:'失败的解析:Landroidx/arch/core/executor/ArchTaskExecutor;'
我在导入 newtonsoft, json 库时正在编程。突然,当我执行我的应用程序时会显示这个 mesaje。以前从来没有出现过。
我回到了我项目的最后一个成功版本,我也删除了新库。但是当我执行它时,仍然是消息。我还尝试执行一个新的“hello world”Xamarin.Android 应用程序,但它说的是相同的。我无法部署 android 模拟器。看起来我的 Visual Studio 和模拟器都崩溃了。
这是错误代码:
我能做什么?Desintall 所有的视觉工作室并重新安装它?有没有办法只重新安装 Android 管理设备?
回答
在你的 Hello World 中,如果使用 Xamarin.AndroidX.App.Compat 1.2.0.7,你还需要 Xamarin.AndroidX.Arch.Core.Runtime Version 2.1.0.8,所以我怀疑你的主项目中也需要它。请参阅https://github.com/xamarin/AndroidX/issues/278。
我使用的是 VS 16.10.0 Prev 1.0,所以如果使用早期版本的 VS 可能会有所不同
- Adding the Xamarin.AndroidX.Arch.Core.Runtime NuGet solves it.
THE END
二维码