简体   繁体   English

我可以安装应用程序,但是在已安装的应用程序集中(在模拟器上)看不到其图标

[英]I can install an application but I don't see its icon in the set of installed applications(on the emulator)

Hey, When I load an application(which I just compiled) in the emulator. 嘿,当我在模拟器中加载一个应用程序(刚编译的)时。 I don't see its icon in the icons of the installed application(on the emulator). 我没有在已安装的应用程序的图标中(在模拟器上)看到其图标。 The command "adb install ..." tells me that the application is successfully installed(I can even uninstall it with "adb uninstall ..." command). 命令“ adb install ...”告诉我该应用程序已成功安装(我什至可以使用“ adb install ...”命令将其卸载)。 The application is nothing more than a "Hello World" type of application, you get when you create a project with "android create project --target ...." command. 该应用程序无非是“ Hello World”类型的应用程序,使用“ android create project --target ....”命令创建项目时会得到。 I can compile and run other application perfectly with the same set of tools. 我可以使用同一套工具完美地编译和运行其他应用程序。

Give me some pointers, what am I missing? 给我一些指示,我想念什么? what have I overlooked? 我忽略了什么? Please help me. 请帮我。

您是否在清单中设置了<category android:name="android.intent.category.LAUNCHER" /> intent-filter?

From my testing of creating new projects, when you specify that you want the Android Project creation wizard to create an activity for you, the intent information will be in the manifest file and you shouldn't have this problem. 通过我对创建新项目的测试,当您指定希望Android Project创建向导为您创建活动时,意图信息将位于清单文件中,并且您应该不会遇到此问题。

If you do not choose to create a project with an activity then you will have to remember to add in this intent information to your manifest manually. 如果您不选择创建带有活动的项目,那么您将必须记住将此意图信息手动添加到清单中。 The intent info should look something along the lines of: 意图信息应类似于以下内容:

    <activity android:name=".MyAppName"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM