猿问

这是什么意思“找不到启动器活动!”

我正在编写一个简单的Android程序,但没有得到这些错误,我不知道它们是什么。我的程序正确,但未显示输出。我认为是因为这两行:


[2005-01-06 19:56:38 - my_Android] No Launcher activity found!

[2005-01-06 19:56:38 - my_Android] The launch will only sync the application package on the device!


慕仙森
浏览 430回答 3
3回答

撒科打诨

就像上面的Gusdor所说,“单个intent-filter标签中的多个action标签也将导致相同的错误。” (给他功劳!我可以为此亲吻Gusdor!)我没有找到任何有关此事实的文档!我添加了一个新的(USB)操作,并且很聪明,我将其混入了相同的Intent过滤器中。它破坏了发射。就像古斯多(Gusdor)所说,一种意图过滤器,一种行动!显然,每个动作都应放入自己的意图过滤器中。它应该看起来像这样...<intent-filter>&nbsp; <action android:name="android.intent.action.MAIN" />&nbsp; <category android:name="android.intent.category.LAUNCHER" /></intent-filter><intent-filter>&nbsp; <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" /></intent-filter>当我这样做时,WAZOO!有效!
随时随地看视频慕课网APP

相关分类

Android
我要回答