安装在模拟器MyFirstApp但无法启动它 [英] MyFirstApp installed on emulator but can't launch it

查看:301
本文介绍了安装在模拟器MyFirstApp但无法启动它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要通过Android建立你的第一个应用程序教程,并已经得到了坚持尝试运行的应用程序。我创建应用程序和模拟器与Eclipse(朱诺建立ID:20120920-0800在OS X上,默认安装的Andr​​oid SDK中,等更新了今天。)

I'm going through the Android 'Building Your First App' tutorial and have gotten stuck trying to run the app. I created the app and emulator with Eclipse (Juno Build id: 20120920-0800 on OS X, default installation. The Android SDK, etc. was updated today).

该应用程序似乎是在模拟器上进行安装。即'首页 - >菜单 - >管理应用程序列表中它和它的应用信息看起来确定。 (总量为24.00KB,应用= 24.00KB,USN存储应用= 0.00B,...)。

The app appears to be installed on the emulator. I.e. 'Home -> Menu -> Manage Apps' lists it and it's App info looks ok. (Total=24.00KB, App=24.00KB, USN storage app=0.00B, ...).

但是,它不会出现在应用程序列表启动(即以'API演示,浏览器,画面等。

However, it does not appear in the apps launch list (i.e. the screen with 'API Demos', 'Browser', etc.

有一些其他的方式来启动它?有什么我必须做的就是它到应用程序列表?任何帮助将是AP preciated - 这是快把我逼疯了。

Is there some other way to launch it? Is there something I have to do to get it into the app list? Any help would be appreciated - this is driving me crazy.

感谢

推荐答案

在您的清单xml文件,你需要确保你有

In your manifest xml file you need to make sure that you have

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

在您的活动定义。如果你没有看到在启动您的应用程序,然后它表明你没有android.intent.category.LAUNCHER集。

in your activity definition. If you don't see your application in the launcher then it suggests you don't have "android.intent.category.LAUNCHER" set.

您manifest文件应该有这样的事情(这不是一个完整的清单)

Your manifest file should have something like (this isn't a complete manifest)

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

您不能只是把意图过滤线在你的清单。如果您双击清单它将打开。你得到2种方法进行编辑,原始XML或使用基本接口。我个人认为你是用生界面更好。你看,当你双击清单打开的窗口下面,你会看到一些类似的标签清单,应用程序......最后是上AndroidManifest.xml中 - 这是原始的XML。第一个是基本设置。

You can't just put the intent-filter lines in your manifest. If you double click the manifest it will open up. You get 2 methods to edit it, raw XML or using a basic interface. Personally I think you're better off with the raw interface. Look below the window that opens when you double click the manifest, you'll see some tabs like Manifest, Application... the last on is AndroidManifest.xml - this is the raw xml. The first one is basic setup.

不要忘了保存清单文件,并做了清理并生成然后运行它。

Don't forget to save your manifest file and do a clean and build then run it.

这篇关于安装在模拟器MyFirstApp但无法启动它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆