【问题标题】:app appears in Manage Applications, but not on the main menu应用程序出现在管理应用程序中,但不在主菜单中
【发布时间】:2011-12-22 21:33:45
【问题描述】:

我正在使用 Eclipse 制作一个 Android 应用程序。我以前用过,没遇到过这个问题。控制台说一切都安装好了,所以我有点困惑。我不确定 logcat 有什么相关性,但如果您认为有帮助,我可以发布它。

我已经以不同的顺序重新启动了 Eclipse、ADB、模拟器和 Mac 几次,但没有任何帮助。我知道这一定很简单,但我已经有几个月没有玩过这个了。

清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hyser.pinpoint"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="10" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
</application>
<activity android:name=".pinpoint" android:label="pinpoint">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
</activity>

【问题讨论】:

  • 你能发布你的 AndroidManifest.xml 吗?您的主要活动需要具有适当的意图过滤器才能显示在应用程序托盘中。
  • 是的,我肯定在那里遗漏了一些东西。我不敢相信我忘了检查。

标签: android eclipse apk


【解决方案1】:

您的活动需要在清单中的应用程序标签内

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >

<activity android:name=".pinpoint" android:label="pinpoint">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
</activity>

</application>

这是一个类似的问题:

Unable to start Service Intent

【讨论】:

    【解决方案2】:

    您的&lt;activity&gt; 标记需要在&lt;application&gt; 块中。

    【讨论】:

      【解决方案3】:

      您的清单是否可能不涉及任何活动?如果您安装的应用程序清单中没有任何活动,您将获得此行为。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-03-01
        • 2020-05-05
        • 1970-01-01
        • 2013-06-19
        • 2016-02-02
        • 2015-11-11
        • 1970-01-01
        相关资源
        最近更新 更多