Xamarin.Android 应用程序仅在干净编译时查找启动器活动 [英] Xamarin.Android app only finding launcher activity on clean compile

查看:14
本文介绍了Xamarin.Android 应用程序仅在干净编译时查找启动器活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Xamarin.Android,活动标记为 MainLauncher,名为 Login.

当我第一次按 F5 时,应用程序在模拟器中正常启动.然后我停下来,做一些代码更改,再次按 F5 我可以看到应用程序在模拟器中启动,当我得到这个时它的 UI 开始显示:

Java.Lang.RuntimeException: 无法实例化活动 ComponentInfo{MyApp.MyApp/md5b14ee1c038eed1ee5328e926d768294f.Login}: java.lang.ClassNotFoundException: 没有找到类md5b14ee1c092328eLogin[Deep5b14ee1c092328eLogin"文件 "/data/app/MyApp.MyApp-1/base.apk"],nativeLibraryDirectories=[/data/app/MyApp.MyApp-1/lib/x86,/vendor/lib,/system/lib]]

然后我会在所有尝试启动它时收到此错误.唯一的解决办法是删除 bin 和 obj 文件夹,然后再次按 F5.之后,应用程序通常会在我必须再次删除文件夹之前启动一次.

解决方案

此问题已修复,将包含在 Visual Studio 15.5.5Visual Studio 15.6 Preview 3.

此修复程序包含的相应 Xamarin.Android 版本为 Xamarin.Android 8.1.5.0(稳定版)Xamarin.Android 8.2.0.6(预览版)>

敬请关注此版本,因为它即将推出!

(如果您今天需要解决方法,请按照此处的步骤操作:https://bugzilla.xamarin.com/show_bug.cgi?id=61073#c40)

I have an Xamarin.Android with the activity marked as MainLauncher called Login.

When I press F5 for first time the app starts ok in the emulator. Then I stop, do some code change, press F5 again I can see the app starting in the emulator and it's UI starting to show when I get this:

Java.Lang.RuntimeException: Unable to instantiate activity ComponentInfo{MyApp.MyApp/md5b14ee1c038eed1ee5328e926d768294f.Login}: java.lang.ClassNotFoundException: Didn't find class "md5b14ee1c038eed1ee5328e926d768294f.Login" on path: DexPathList[[zip file "/data/app/MyApp.MyApp-1/base.apk"],nativeLibraryDirectories=[/data/app/MyApp.MyApp-1/lib/x86, /vendor/lib, /system/lib]]

Then I will get this error on all attempts to start it. The only solution is to delete the bin and obj folders and press F5 again. After that the app will normally start once before I have to remove the folders again.

解决方案

This issue has been fixed and will be included in Visual Studio 15.5.5 or Visual Studio 15.6 Preview 3.

The respective Xamarin.Android version this fix is included in are Xamarin.Android 8.1.5.0 (Stable) and Xamarin.Android 8.2.0.6 (Preview)

Be on the look-out for this release as it will be available soon!

(If you need a workaround today, please follow the steps here: https://bugzilla.xamarin.com/show_bug.cgi?id=61073#c40)

这篇关于Xamarin.Android 应用程序仅在干净编译时查找启动器活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆