找不到Android清单启动器 [英] Android Manifest Launcher Not Found

查看:93
本文介绍了找不到Android清单启动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将启动器活动更改为与默认活动不同的活动. 但是,当我运行该应用程序时,我无法启动该应用程序. 在logCat中,它表示已安装了该应用程序,但在主屏幕上看不到该应用程序.

I changed my Launcher activity to a different activity than the default Activity. But when I am running the Application I am not able to start the application. In the logCat it is saying that the application has been installed but I am not able to see the app in the home screen.

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

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="21" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".Days"
        android:label="@string/app_name" 
        android:theme="@android:style/Theme.Holo" >
        <intent-filter>
            <action android:name="android.intent.action.DAYS" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Holo" >
        <intent-filter>
            <action android:name="com.example.collegehack.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

</application>

</manifest>

请告诉我我要去哪里错了. 预先感谢.

Please tell me where I am going wrong. Thanks in advance.

编辑:在控制台中获取以下消息:

EDIT Getting the following message in console :

[2015-02-09 02:25:29 - CollegeHack] Android Launch!
[2015-02-09 02:25:29 - CollegeHack] adb is running normally.
[2015-02-09 02:25:29 - CollegeHack] No Launcher activity found!
[2015-02-09 02:25:29 - CollegeHack] The launch will only sync the application package on the device!
[2015-02-09 02:25:29 - CollegeHack] Performing sync
[2015-02-09 02:25:30 - CollegeHack] Automatic Target Mode: Preferred AVD 'Practice' is available on emulator 'emulator-5554'
[2015-02-09 02:25:30 - CollegeHack] Uploading CollegeHack.apk onto device 'emulator-5554'
[2015-02-09 02:25:31 - CollegeHack] Installing CollegeHack.apk...
[2015-02-09 02:25:43 - CollegeHack] Success!
[2015-02-09 02:25:43 - CollegeHack] \CollegeHack\bin\CollegeHack.apk installed on device
[2015-02-09 02:25:43 - CollegeHack] Done!

推荐答案

删除主要活动的意图过滤器,并将该意图过滤器添加到您的天活动"中:

Remove intent filter of Main Activity and put this intent filter to your Days Activity:

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

这篇关于找不到Android清单启动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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