Xamarin - Android - Visual Studio - 应用程序无法启动 [英] Xamarin - Android - Visual Studio - The application could not be started

查看:44
本文介绍了Xamarin - Android - Visual Studio - 应用程序无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Visual Studio 2012 中使用 Xamarin 处理一个 Android 项目.我最近从 HDD 升级到了 SSD,因此我重新安装了 Windows 和我的所有程序.

I was working on an Android project using Xamarin in Visual Studio 2012. I recently upgraded from an HDD to a SSD so I reinstalled Windows and all of my programs.

在克隆我的 git 存储库并尝试在我的设备上运行应用程序后,我无法让它运行.我能够启动一个新的 hello world 项目并运行它,但我无法运行该项目.

After cloning my git repository and trying to run the application on my device, I have not been able to get it to run. I was able to start a new hello world project and I got that to run, but I can't get this project to run.

错误是这样的:

应用程序无法启动.确保应用程序已安装到目标设备并具有可启动的 Activity (MainLauncher = true).

此外,检查 Build->Configuration Manager 以确保将此项目设置为此配置的 Deploy.

我已经搜索了此问题的解决方案,但找不到任何有效的方法.

I have searched for a solution to this issue but have been unable to find anything that worked.

推荐答案

我解决了这个问题.不知何故,该应用程序仍然存在于我的设备上,即使它没有出现在我的应用程序中,我需要将其删除.

I solved the issue. Somehow the application still existed on my device even though it did not show up in my applications and I needed to remove it.

解决方案是找到我通过电子邮件发送的旧 APK 并安装了它.然后我卸载了该应用程序并从 Visual Studio 再次部署它.这次成功了.

The solution was to find an old APK that I had emailed and I installed that. Then I uninstalled the application and deployed it again from Visual Studio. This time it worked.

您可以在此处阅读更多信息:https://forums.xamarin.com/discussion/8501/install-failed-update-incompatible

You can read more here: https://forums.xamarin.com/discussion/8501/install-failed-update-incompatible

编辑(2017 年 3 月 13 日):

似乎很多人发现这个答案很有用,所以我决定如果您无法访问旧版本,我应该使用替代方法更新它以卸载应用程序.

Seems a lot of people found this answer useful so I decided I should update it with an alternate method to uninstall the app if you don't have access to an old version.

正如 Atul Chaudhary 和 Nestel 提到的,您可以打开 adb 命令提示符并运行 adb uninstall .如果您的应用程序仍有任何残余,则应将其清除.

As Atul Chaudhary and Nestel mentioned, you can open up your adb command prompt and run adb uninstall <com.your.application.package.name>. If there are any remnants of your application which remain this should get rid of them.

这篇关于Xamarin - Android - Visual Studio - 应用程序无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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