Xamarin无法启动应用程序
大家好,我有个问题:Xamarin无法启动应用程序,xamarin,Xamarin,大家好,我有个问题: The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true). 我所做的事情: 亚行卸载;什么也没发生 试着从设备上卸载应用程序:该应用程序不会自动启动,就像一个0 KB的假应用程序一样 从应用程序中卸载Mono共享Ru
The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true).
我所做的事情:
- 亚行卸载;什么也没发生
- 试着从设备上卸载应用程序:该应用程序不会自动启动,就像一个0 KB的假应用程序一样
- 从应用程序中卸载Mono共享Runtine和Api
- 工厂重置
- 签入其他设备
[Activity(Label = "AppTecnicos", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
无法启动应用程序。确保…具有可启动的活动(MainLauncher=true)
应用程序中的一个活动
需要指定为mainloancher
,否则Android操作系统不知道应用程序的主要入口点和显示内容
在Xamarin.Android
中,通常通过ActivityAttribute
分配MainLauncher=true
来完成此操作
例如:
[Activity(Label = "StackOverflow", MainLauncher = true, Icon = "@mipmap/icon")]
public class MainActivity : AppCompatActivity
{
~~~
}
参考:
无法启动应用程序。确保…具有可启动的活动(MainLauncher=true)
应用程序中的一个活动
需要指定为mainloancher
,否则Android操作系统不知道应用程序的主要入口点和显示内容
在Xamarin.Android
中,通常通过ActivityAttribute
分配MainLauncher=true
来完成此操作
例如:
[Activity(Label = "StackOverflow", MainLauncher = true, Icon = "@mipmap/icon")]
public class MainActivity : AppCompatActivity
{
~~~
}
Ref:我发现了错误(最终):我的应用程序包名称以大写字母开头
AppTecnicos.Droid
我把它改成:
appTecnicos.Droid
我发现了错误(最后):我的应用程序包名称以大写字母开头
AppTecnicos.Droid
我把它改成:
appTecnicos.Droid
如果您使用的是VisualStudio,并且您的应用程序是Xamarin.Forms应用程序,那么这可能是由于解决方案配置问题造成的
在这种情况下,请尝试打开解决方案属性,并在“配置属性”部分检查您的项目是否已选中部署。如果您使用的是visual studio,并且您的应用程序是Xamarin.Forms应用程序,则这可能是由于解决方案配置问题造成的
在这种情况下,请尝试打开解决方案属性,并在“配置属性”部分检查您的项目是否已检查部署。They get MainLaucher=true They get MainLaucher=true