没有发射活动中发现的错误 [英] no launcher activity found error

查看:141
本文介绍了没有发射活动中发现的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建的显示的Hello World和一个按钮标有测试中,当我preSS此按钮吐司将显示一条消息,我运行在模拟器上这个程序很简单的活动。

I created very simple activity that displays hello world and a button labled TEST, when i press this button the Toast will display a message and I run this app on the emulator.

问题是,当我尝试运行此应用程序中的控制台显示了

the problem is that, when I try to run this app the console displays that

no launcher activity found

和没有到模​​拟器虽然code的任何错误都被显示出来。

and nothing to be displayed on the emulator although the code has no error at all.

manifest.xml的:

manifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.qr00"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".QR00"
        android:label="@string/title_activity_qr00" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="QR00" />
    </activity>
</application>

谁能告诉我如何解决无发射活动找到错误?

Can anyone tell me how to solve the "no launcher activity found" error?

推荐答案

您需要添加

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

所以:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.qr00"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".QR00"
        android:label="@string/title_activity_qr00" >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="QR00" />
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

这篇关于没有发射活动中发现的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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