2017-02-14 184 views
0

嗨每个人我有一个是烦人的问题: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). 

东西我:

  • 亚行卸载;什么也没有发生
  • 尝试UNINSTAL应用从设备:应用程序不apeard,甚至像一个虚假的应用蒙山0KB
  • 卸载单共享Runtine和API的应用程序
  • 出厂设置
  • 入住在其他设备

没有解决我的问题,我不知道我必须做什么。

Add:

My MainActivity;

[Activity(Label = "AppTecnicos", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] 

回答

2

我发现错误(最后)我的应用程序包的名称开始白衣大写在前

AppTecnicos.Droid 

我将其更改为:

appTecnicos.Droid 
1

应用程序无法启动。确保...有一个可启动活动(MainLauncher = true)。需要被指定为MainLauncher

一个Activity在您的应用程序,否则Android操作系统不知道主入口点的应用程序和显示什么。

Xamarin.Android通常这是通过ActivityAttribute指定MainLauncher = true完成的。

例子:

[Activity(Label = "StackOverflow", MainLauncher = true, Icon = "@mipmap/icon")] 
public class MainActivity : AppCompatActivity 
{ 
    ~~~ 
} 

编号:ActivityAttribute Class

+0

他们得到了MainLaucher = true – Efeyabel

0

如果您使用visual studio,并且您的应用程序是Xamarin.Forms应用程序,则可能由于解决方案配置问题而发生此情况。

在这种情况下,尝试打开解决方案属性并在配置属性部分中检查您的项目是否已检查部署。