繁体   English   中英

Android应用程序未显示在App Drawer中

[英]Android Application is not showing up in the App Drawer

嘿我试图在应用程序抽屉中找到我的应用程序有点问题,它出现在其他地方 - 最近的应用程序(通过按住主页),它也在应用程序下的设置中。

它不是唯一的地方在app抽屉里,我的第一个猜测是Manifest?

该应用程序运行完美。

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

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

<application
    android:icon="@drawable/ic_launcher"
    android:label="Brain Hacker Pro"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="Brain Hacker Pro" >
        <intent-filter>
            <action android:name="com.zaknorris.brainhacker.v1.Menu" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".attentionbuilder"
        android:label="Attention Builder" >
        <intent-filter>
            <action android:name="com.zaknorris.brainhacker.v1.attentionbuilder" />

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

图标在drawable中就在那里和一切。

不确定发生了什么:\\

Java新手

你需要这个:

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

在你的一个活动元素中

将您的AndroidManifest更改为此:

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

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

<application
    android:icon="@drawable/ic_launcher"
    android:label="Brain Hacker Pro"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="Brain Hacker Pro" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".attentionbuilder"
        android:label="Attention Builder" >
        <intent-filter>
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

IntentFilter为要首先打开的活动设置MainLauncher=true 这个答案是关于Xmarin.android的。

对于android Java:

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

暂无
暂无

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

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