Android Studio:“应用程序"图标未出现在主屏幕或应用程序列表中 [英] Android Studio: App icon doesn't appear in the home screen or app list

查看:110
本文介绍了Android Studio:“应用程序"图标未出现在主屏幕或应用程序列表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的自行开发的应用程序存在严重问题.

I have a serious problem with my self developed app.

长篇故事:

我创建了一个应用程序,并在台式机上进行了开发.因为我需要向客户展示它,所以我决定在我的笔记本电脑上安装android studio并在那里尝试该应用程序.我将项目导入我的笔记本电脑并启动了Android Studio,运行了该项目,该应用程序开始运行并像往常一样在智能手机上正常工作,但是……当我回到主屏幕时,图标丢失了(在我的台式机上显示了PC版本),甚至没有出现在应用程序列表中,但是如果我在设置"->管理应用程序"上进行显示,则可以取消安装或停止它,但是因为我没有如果我不使用Android Studio重新运行该应用程序,则无法再次启动该图标.我回到桌面PC并尝试从那里重新运行该应用程序,但是图标仍然没有更改.

I have created an app and developed it on my desktop pc. Because I need to show it to my customer, I decided to install android studio on my Notebook and try the app there. I imported the project on my Notebook and started Android Studio, I ran the project, the app started and worked like always on my smartphone but......when I went back to the homescreen the Icon was missing (while on my desktop pc version was shown) and it wasn't even in the app list, but if I go on "Settings" --> "Manage applications", it's shown there, I can unistall or stop it, but because I don't have an icon I can't start it again if I don't rerun the app with Android Studio. I went back to my desktop pc and tried to rerun the app from there, but nothing changed the icon is still missing.

短篇小说:从我的笔记本在装有android studio的手机上重新安装我的应用程序后,主屏幕和应用程序列表中缺少该应用程序图标,但是我可以在设置"->管理应用程序"中看到它.如果我回到开发该应用程序的原始PC并尝试重新运行它,结果将是相同的...图标丢失.

Short Story: After reinstalling my app on my phone with android studio from my notebook, the app icon is missing from the home screen and application list, but I can see it in "Settings" --> "Manage applications". If I go back to my original pc where I developed the app and try to rerun it, the result is the same...icon missing.

我阅读了所有与我在Stackoverflow上的问题类似的帖子,但是没有任何帮助我解决它.我希望有人能帮助我.

I read all the post that are similar to my problem on Stackoverflow, but nothing helped me to resolve it. I hope that someone can help me about it.

如果需要,我发布了AndroidManifest.xml,但是由于隐私/版权,我无法发布所有代码,对不起.我试图用最正确的英语来写,如果我的写得太糟了,我事先表示歉意.

I posted the AndroidManifest.xml if needed but I can't post all the code because of privacy/copyright, sorry. I tried to write in the most correct english I could, I apologize in advance if my writing is horrible.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.steel.bluetoothdatatransfer" >

<uses-sdk
    android:minSdkVersion="12"
    android:targetSdkVersion="22" />

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.SMS_DELIVER_ACTION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<!-- <uses-permission android:name="android.permission.BROADCAST_SMS" /> -->
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_bt"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <action android:name="android.intent.action.SEND" />
            <action android:name="android.intent.action.SENDTO" />

            <data android:scheme="sms" />
            <data android:scheme="smsto" />
            <data android:scheme="mms" />
            <data android:scheme="mmsto" />
        </intent-filter>
    </activity>

    <receiver
        android:name=".RecMex"
        android:enabled="true"
        android:exported="true"
        android:permission="android.permission.BROADCAST_SMS" >
        <intent-filter>
            <action android:name="android.provider.Telephony.SMS_RECEIVED" />
        </intent-filter>
    </receiver>

    <!-- BroadcastReceiver that listens for incoming MMS messages -->

    <receiver
        android:name=".MmsReceiver"
        android:enabled="true"
        android:exported="true"
        android:permission="android.permission.BROADCAST_WAP_PUSH" >
        <intent-filter>
            <action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" />

            <data android:mimeType="application/vnd.wap.mms-message" />
        </intent-filter>
    </receiver>

    <!-- Activity that allows the user to send new SMS/MMS messages -->

    <activity
        android:name=".ComposeSmsActivity"
        android:label="@string/title_activity_compose_sms" >
        <intent-filter>
            <action android:name="android.intent.action.SEND" />
            <action android:name="android.intent.action.SENDTO" />

            <data android:scheme="sms" />
            <data android:scheme="smsto" />
            <data android:scheme="mms" />
            <data android:scheme="mmsto" />
        </intent-filter>
    </activity>

    <!-- Service that delivers messages from the phone "quick response" -->

    <service
        android:name=".HeadlessSmsSendService"
        android:enabled="true"
        android:exported="true"
        android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE" >
        <intent-filter>
            <action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />

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

            <data android:scheme="sms" />
            <data android:scheme="smsto" />
            <data android:scheme="mms" />
            <data android:scheme="mmsto" />
        </intent-filter>
    </service>

    <!-- BroadcastReceiver that listens for incoming SMS messages -->
    <receiver
        android:name=".SmsReceiver"
        android:permission="android.permission.BROADCAST_SMS" >
        <intent-filter>
            <action android:name="android.provider.Telephony.SMS_DELIVER" />
        </intent-filter>
    </receiver>

    <activity
        android:name=".DeviceListActivity"
        android:label="@string/intestazione"
        android:theme="@android:style/Theme.Holo.Dialog"
        >
    </activity>


</application>

推荐答案

之所以发生,是因为您将所有内容都传递给了一个意图过滤器.尝试根据用例将它们分开,或者至少将Launcher和Main过滤器分开.

It is happening because you passed everything into one intent filter. Try to separate them per use case or at least separate Launcher and Main filter.

赞:

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

        <action android:name="android.intent.action.SEND" />
        <action android:name="android.intent.action.SENDTO" />

        <data android:scheme="sms" />
        <data android:scheme="smsto" />
        <data android:scheme="mms" />
        <data android:scheme="mmsto" />
</intent-filter>

这篇关于Android Studio:“应用程序"图标未出现在主屏幕或应用程序列表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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