Xamarin - Android - Visual Studio - The applicatio

2019-01-17 20:14发布

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.

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.

This is what the error says:

The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true).

Additionally, check Build->Configuration Manager to ensure this project is set to Deploy for this configuration.

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

14条回答
迷人小祖宗
2楼-- · 2019-01-17 21:08

In my case issue was two activities were Launcher activities,so I made one of them Launcher activity.

You can remove <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> from AndroidManifest.xml file or MainLauncher = true from .cs Activity file attribute

查看更多
来,给爷笑一个
3楼-- · 2019-01-17 21:10

If you've reinstalled everything you may have to set the configuration manager back up in VS.

In Visual Studio: Build -> Configuration Manager -> Put a check in the "Deploy" box.

查看更多
登录 后发表回答